您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

1 行
3.8 KiB

  1. {"ast":null,"code":"var __jsx = React.createElement;\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\nimport classNames from \"classnames\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Select from 'react-select';\nimport Button from \"components/CustomButtons/Button.js\";\nimport Icon from \"@material-ui/core/Icon\";\nimport styles from \"assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js\";\nimport Card from \"components/Card/Card.js\";\nimport CardBody from \"components/Card/CardBody.js\";\nimport GridContainer from \"components/Grid/GridContainer.js\";\nimport GridItem from \"components/Grid/GridItem.js\";\nconst useStyles = makeStyles(styles);\n\nconst DataYGP = function (_ref) {\n let {\n selected,\n handleName,\n backend,\n ygp\n } = _ref,\n props = _objectWithoutProperties(_ref, [\"selected\", \"handleName\", \"backend\", \"ygp\"]);\n\n const classes = useStyles();\n const rest = Object.assign({}, props);\n const imageClasses = classNames(classes.imgRaised, classes.imgRoundedCircle, classes.imgFluid);\n const navImageClasses = classNames(classes.imgRounded, classes.imgGallery);\n const ProductYGP = ygp.map(data => {\n return __jsx(\"div\", {\n style: {\n padding: \"20px\",\n marginTop: \"-40px\"\n }\n }, __jsx(Card, {\n className: classes.textCenter,\n align: \"center\",\n style: {\n width: \"300px\"\n }\n }, __jsx(CardBody, null, __jsx(\"div\", {\n align: \"center\",\n style: {\n padding: \"10px\"\n }\n }, __jsx(\"img\", {\n style: {\n width: \"250px\",\n display: \"block\"\n },\n src: `${backend}${data.img[\"url\"]}`,\n className: navImageClasses\n }), __jsx(\"div\", {\n align: \"center\"\n }, __jsx(\"h5\", null, data.name), __jsx(\"h5\", null, \"Rp.\", data.price), __jsx(Button, {\n color: \"info\",\n round: true,\n href: \"/yamaha/product/ygp_detail?s=\" + data.id\n }, __jsx(Icon, {\n className: classes.icons\n }, \"open_in_new\"), \"Detail Product\"))))));\n });\n return __jsx(\"div\", null, __jsx(Card, {\n className: classes.textCenter,\n align: \"center\",\n style: {\n padding: \"5px\"\n }\n }, __jsx(CardBody, null, __jsx(\"div\", {\n align: \"center\",\n style: {\n marginTop: \"-50px\"\n }\n }, __jsx(\"h2\", null, \"Yamaha Geniue Part\"), __jsx(Select, {\n value: selected ? ygp.filter(i => i.id == selected) : null,\n getOptionLabel: option => `${option.name} ${option.part_code}`,\n getOptionValue: option => option.id,\n options: ygp,\n isMulti: true,\n instanceId: \"name\",\n placeholder: \"filter by Nama Part\",\n onChange: values => handleName(values)\n }), __jsx(\"br\", null), __jsx(GridContainer, {\n justify: \"center\",\n style: {\n padding: \"40px\",\n marginTop: \"-50px\"\n }\n }, ProductYGP)))));\n};\n\nexport default DataYGP;","map":null,"metadata":{},"sourceType":"module"}