From f811aa9bf450ebbb9fcf6ded938b0efea6a2e668 Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Thu, 2 Sep 2021 15:25:24 +0530 Subject: [PATCH] update for upload name check --- build/asset-manifest.json | 10 +++++----- build/index.html | 2 +- build/static/js/8.7de7703f.chunk.js.map | 1 - .../js/{8.7de7703f.chunk.js => 8.ce911cc9.chunk.js} | 4 ++-- build/static/js/8.ce911cc9.chunk.js.map | 1 + ...ntime-main.d854c4ea.js => runtime-main.9e5a7d84.js} | 4 ++-- ...in.d854c4ea.js.map => runtime-main.9e5a7d84.js.map} | 2 +- src/views/Uploader/index.js | 5 ++++- 8 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 build/static/js/8.7de7703f.chunk.js.map rename build/static/js/{8.7de7703f.chunk.js => 8.ce911cc9.chunk.js} (51%) create mode 100644 build/static/js/8.ce911cc9.chunk.js.map rename build/static/js/{runtime-main.d854c4ea.js => runtime-main.9e5a7d84.js} (61%) rename build/static/js/{runtime-main.d854c4ea.js.map => runtime-main.9e5a7d84.js.map} (99%) diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 893c33d..5e5c684 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -8,8 +8,8 @@ "main.css": "./static/css/main.12e98d00.chunk.css", "main.js": "./static/js/main.a301aabf.chunk.js", "main.js.map": "./static/js/main.a301aabf.chunk.js.map", - "runtime-main.js": "./static/js/runtime-main.d854c4ea.js", - "runtime-main.js.map": "./static/js/runtime-main.d854c4ea.js.map", + "runtime-main.js": "./static/js/runtime-main.9e5a7d84.js", + "runtime-main.js.map": "./static/js/runtime-main.9e5a7d84.js.map", "static/js/4.5bad680f.chunk.js": "./static/js/4.5bad680f.chunk.js", "static/js/4.5bad680f.chunk.js.map": "./static/js/4.5bad680f.chunk.js.map", "static/css/5.ecdd39c8.chunk.css": "./static/css/5.ecdd39c8.chunk.css", @@ -19,8 +19,8 @@ "static/js/6.01c8543c.chunk.js.map": "./static/js/6.01c8543c.chunk.js.map", "static/js/7.4312b043.chunk.js": "./static/js/7.4312b043.chunk.js", "static/js/7.4312b043.chunk.js.map": "./static/js/7.4312b043.chunk.js.map", - "static/js/8.7de7703f.chunk.js": "./static/js/8.7de7703f.chunk.js", - "static/js/8.7de7703f.chunk.js.map": "./static/js/8.7de7703f.chunk.js.map", + "static/js/8.ce911cc9.chunk.js": "./static/js/8.ce911cc9.chunk.js", + "static/js/8.ce911cc9.chunk.js.map": "./static/js/8.ce911cc9.chunk.js.map", "static/js/9.421fefda.chunk.js": "./static/js/9.421fefda.chunk.js", "static/js/9.421fefda.chunk.js.map": "./static/js/9.421fefda.chunk.js.map", "static/js/10.86be3482.chunk.js": "./static/js/10.86be3482.chunk.js", @@ -44,7 +44,7 @@ "static/js/6.01c8543c.chunk.js.LICENSE.txt": "./static/js/6.01c8543c.chunk.js.LICENSE.txt" }, "entrypoints": [ - "static/js/runtime-main.d854c4ea.js", + "static/js/runtime-main.9e5a7d84.js", "static/js/4.5bad680f.chunk.js", "static/css/main.12e98d00.chunk.css", "static/js/main.a301aabf.chunk.js" diff --git a/build/index.html b/build/index.html index 7e61b0c..058b984 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -FBS Admin tool
\ No newline at end of file +FBS Admin tool
\ No newline at end of file diff --git a/build/static/js/8.7de7703f.chunk.js.map b/build/static/js/8.7de7703f.chunk.js.map deleted file mode 100644 index 4dd9a7b..0000000 --- a/build/static/js/8.7de7703f.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["views/Uploader/index.js"],"names":["Uploader","useState","file","setFile","row","md","htmlFor","xs","type","onChange","e","target","files","id","name","onClick","data","FormData","append","chk","trim","axios","post","then","res","statusText","alert","size","color"],"mappings":"mPAuFeA,UAtEf,WAEI,MAAwBC,mBAAS,MAAjC,mBAAOC,EAAP,KAAaC,EAAb,KA8BA,OAAS,8BAEL,eACA,IADA,WAEA,cACA,IADA,oDAFA,IAKc,eACd,IADc,WAEd,eACA,IADA,CACWC,KAAG,EADd,UAEA,eACA,IADA,CACKC,GAAK,IADV,UAEA,cACA,IADA,CACOC,QAAU,aADjB,wIAFA,OAFA,IAMO,cACP,IADO,CACFC,GAAK,KACVF,GAAK,IAFE,SAGP,cACA,IADA,CACWG,KAAO,OAClBC,SAhDJ,SAAyBC,GACrBP,EAAQO,EAAEC,OAAOC,MAAM,KAgDvBC,GAAK,aACLC,KAAO,iBAbP,OAiBA,eAAC,IAAD,WACA,eAAC,IAAD,CAASN,KAAO,SAChBO,QApDJ,SAAwBL,GACpB,IAAMM,EAAO,IAAIC,SACjBD,EAAKE,OAAO,OAAQhB,GACpB,IAAMiB,EAAMjB,EAAKY,KAAKM,OACX,kDAARD,GAAqC,8DAARA,EAE9BE,IAAMC,KAAK,oCAAqCN,EAAM,IAEnDO,MAAK,SAAAC,GAEoB,MAAlBA,EAAIC,YACNC,MAAM,2FAKdA,MAAM,+DAAexB,EAAKY,KAAO,kSAqCnCa,KAAO,KACPC,MAAQ,UAHR,cAGoB,cAAE,IAAF,CAAQd,KAAO,iBAHnC,4CADA","file":"static/js/8.7de7703f.chunk.js","sourcesContent":["import React, { useState } from 'react';\nimport axios from 'axios';\nimport {\n CCol,\n CFormGroup,\n CInput,\n CInputFile,\n CLabel,\n CButton,\n CCard,\n CCardHeader,\n CCardBody,\n CCardFooter,\n} from '@coreui/react'\nimport CIcon from '@coreui/icons-react'\n\n\nfunction Uploader() {\n\n const [file, setFile] = useState(null);\n\n function onChangeHandler(e) {\n setFile(e.target.files[0])\n }\n\n function onClickHandler(e) {\n const data = new FormData()\n data.append('file', file);\n const chk = file.name.trim();\n if(chk === 'ini_工程内検査票.xlsx' || chk === 'ini_データ入力シート.xlsx')\n {\n axios.post(\"https://fsbsso.sumasen.net/upload\", data, { // receive two parameter endpoint url ,form data\n })\n .then(res => { // then print response status\n //console.log(res.statusText)\n if (res.statusText == 'OK') {\n alert(\"正常にアップロードされました\");\n }\n });\n }\n else {\n alert(\"指定されたファイル名\" + file.name + \"が間違っています。ini_工程内検査表.xlsx または ini_データ入力シート.xlsx のどちらかに名前を変更してください。\");\n return\n }\n //console.log(file.name);\n //console.log('calling upload');\n\n }\n\n return ( <\n div >\n <\n CCard >\n <\n CCardHeader >\n アップロード <\n /CCardHeader> <\n CCardBody >\n <\n CFormGroup row >\n <\n CCol md = \"3\" >\n <\n CLabel htmlFor = \"date-input\" > アップロードするファイルを選んでください < /CLabel> < /\n CCol > <\n CCol xs = \"12\"\n md = \"9\" >\n <\n CInputFile type = \"file\"\n onChange = { onChangeHandler }\n id = \"file-input\"\n name = \"file-input\" / >\n <\n /CCol> < /\n CFormGroup >\n \n < CIcon name = \"cil-scrubber\" / > アップロード < /CButton> < /\n CCardFooter>\n \n \n \n )\n}\n\nexport default Uploader\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/static/js/8.7de7703f.chunk.js b/build/static/js/8.ce911cc9.chunk.js similarity index 51% rename from build/static/js/8.7de7703f.chunk.js rename to build/static/js/8.ce911cc9.chunk.js index c8db86d..dd31cd2 100644 --- a/build/static/js/8.7de7703f.chunk.js +++ b/build/static/js/8.ce911cc9.chunk.js @@ -1,2 +1,2 @@ -(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[8],{775:function(e,t,i){"use strict";i.r(t);var n=i(657),s=i(1),c=i(644),r=i.n(c),a=i(639),l=i(638),j=i(18);t.default=function(){var e=Object(s.useState)(null),t=Object(n.a)(e,2),i=t[0],c=t[1];return Object(j.jsx)("div",{children:Object(j.jsxs)(a.f,{children:[Object(j.jsx)(a.j,{children:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 "})," ",Object(j.jsxs)(a.g,{children:[Object(j.jsxs)(a.t,{row:!0,children:[Object(j.jsxs)(a.k,{md:"3",children:[Object(j.jsx)(a.H,{htmlFor:"date-input",children:" \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044 "})," "]})," ",Object(j.jsx)(a.k,{xs:"12",md:"9",children:Object(j.jsx)(a.C,{type:"file",onChange:function(e){c(e.target.files[0])},id:"file-input",name:"file-input"})})," "]}),Object(j.jsxs)(a.h,{children:[Object(j.jsxs)(a.e,{type:"submit",onClick:function(e){var t=new FormData;t.append("file",i);var n=i.name.trim();"ini_\u5de5\u7a0b\u5185\u691c\u67fb\u7968.xlsx"===n||"ini_\u30c7\u30fc\u30bf\u5165\u529b\u30b7\u30fc\u30c8.xlsx"===n?r.a.post("https://fsbsso.sumasen.net/upload",t,{}).then((function(e){"OK"==e.statusText&&alert("\u6b63\u5e38\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3057\u305f")})):alert("\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u540d"+i.name+"\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002ini_\u5de5\u7a0b\u5185\u691c\u67fb\u8868.xlsx \u307e\u305f\u306f ini_\u30c7\u30fc\u30bf\u5165\u529b\u30b7\u30fc\u30c8.xlsx \u306e\u3069\u3061\u3089\u304b\u306b\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002")},size:"sm",color:"primary",children:[" ",Object(j.jsx)(l.a,{name:"cil-scrubber"})," \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 "]})," "]})]})]})})}}}]); -//# sourceMappingURL=8.7de7703f.chunk.js.map \ No newline at end of file +(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[8],{775:function(e,t,i){"use strict";i.r(t);var n=i(657),s=i(1),c=i(644),r=i.n(c),a=i(639),l=i(638),j=i(18);t.default=function(){var e=Object(s.useState)(null),t=Object(n.a)(e,2),i=t[0],c=t[1];return Object(j.jsx)("div",{children:Object(j.jsxs)(a.f,{children:[Object(j.jsx)(a.j,{children:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 "})," ",Object(j.jsxs)(a.g,{children:[Object(j.jsxs)(a.t,{row:!0,children:[Object(j.jsxs)(a.k,{md:"3",children:[Object(j.jsx)(a.H,{htmlFor:"date-input",children:" \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044 "})," "]})," ",Object(j.jsx)(a.k,{xs:"12",md:"9",children:Object(j.jsx)(a.C,{type:"file",onChange:function(e){c(e.target.files[0])},id:"file-input",name:"file-input"})})," "]}),Object(j.jsxs)(a.h,{children:[Object(j.jsxs)(a.e,{type:"submit",onClick:function(e){var t=new FormData;t.append("file",i);var n=i.name.trim(),s=new Intl.Collator("ja"),c=s.compare("ini_\u5de5\u7a0b\u5185\u691c\u67fb\u7968.xlsx",n),a=s.compare("ini_\u30c7\u30fc\u30bf\u5165\u529b\u30b7\u30fc\u30c8.xlsx",n);0===c||0===a?r.a.post("https://fsbsso.sumasen.net/upload",t,{}).then((function(e){"OK"==e.statusText&&alert("\u6b63\u5e38\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3057\u305f")})):alert("\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u540d"+i.name+"\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002ini_\u5de5\u7a0b\u5185\u691c\u67fb\u8868.xlsx \u307e\u305f\u306f ini_\u30c7\u30fc\u30bf\u5165\u529b\u30b7\u30fc\u30c8.xlsx \u306e\u3069\u3061\u3089\u304b\u306b\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002")},size:"sm",color:"primary",children:[" ",Object(j.jsx)(l.a,{name:"cil-scrubber"})," \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 "]})," "]})]})]})})}}}]); +//# sourceMappingURL=8.ce911cc9.chunk.js.map \ No newline at end of file diff --git a/build/static/js/8.ce911cc9.chunk.js.map b/build/static/js/8.ce911cc9.chunk.js.map new file mode 100644 index 0000000..0ad8e7f --- /dev/null +++ b/build/static/js/8.ce911cc9.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["views/Uploader/index.js"],"names":["Uploader","useState","file","setFile","row","md","htmlFor","xs","type","onChange","e","target","files","id","name","onClick","data","FormData","append","chk","trim","collator","Intl","Collator","order1","compare","order2","axios","post","then","res","statusText","alert","size","color"],"mappings":"mPA0FeA,UAzEf,WAEI,MAAwBC,mBAAS,MAAjC,mBAAOC,EAAP,KAAaC,EAAb,KAiCA,OAAS,8BAEL,eACA,IADA,WAEA,cACA,IADA,oDAFA,IAKc,eACd,IADc,WAEd,eACA,IADA,CACWC,KAAG,EADd,UAEA,eACA,IADA,CACKC,GAAK,IADV,UAEA,cACA,IADA,CACOC,QAAU,aADjB,wIAFA,OAFA,IAMO,cACP,IADO,CACFC,GAAK,KACVF,GAAK,IAFE,SAGP,cACA,IADA,CACWG,KAAO,OAClBC,SAnDJ,SAAyBC,GACrBP,EAAQO,EAAEC,OAAOC,MAAM,KAmDvBC,GAAK,aACLC,KAAO,iBAbP,OAiBA,eAAC,IAAD,WACA,eAAC,IAAD,CAASN,KAAO,SAChBO,QAvDJ,SAAwBL,GACpB,IAAMM,EAAO,IAAIC,SACjBD,EAAKE,OAAO,OAAQhB,GACpB,IAAMiB,EAAMjB,EAAKY,KAAKM,OAChBC,EAAW,IAAIC,KAAKC,SAAS,MAC7BC,EAASH,EAASI,QAAQ,gDAAmBN,GAC7CO,EAASL,EAASI,QAAQ,4DAAqBN,GACvC,IAAXK,GAA2B,IAAXE,EAEjBC,IAAMC,KAAK,oCAAqCZ,EAAM,IAEnDa,MAAK,SAAAC,GAEoB,MAAlBA,EAAIC,YACNC,MAAM,2FAKdA,MAAM,+DAAe9B,EAAKY,KAAO,kSAqCnCmB,KAAO,KACPC,MAAQ,UAHR,cAGoB,cAAE,IAAF,CAAQpB,KAAO,iBAHnC,4CADA","file":"static/js/8.ce911cc9.chunk.js","sourcesContent":["import React, { useState } from 'react';\nimport axios from 'axios';\nimport {\n CCol,\n CFormGroup,\n CInput,\n CInputFile,\n CLabel,\n CButton,\n CCard,\n CCardHeader,\n CCardBody,\n CCardFooter,\n} from '@coreui/react'\nimport CIcon from '@coreui/icons-react'\n\n\nfunction Uploader() {\n\n const [file, setFile] = useState(null);\n\n function onChangeHandler(e) {\n setFile(e.target.files[0])\n }\n\n function onClickHandler(e) {\n const data = new FormData()\n data.append('file', file);\n const chk = file.name.trim();\n const collator = new Intl.Collator('ja'); \n const order1 = collator.compare('ini_工程内検査票.xlsx', chk); \n const order2 = collator.compare('ini_データ入力シート.xlsx', chk); \n if(order1 === 0 || order2 === 0)\n {\n axios.post(\"https://fsbsso.sumasen.net/upload\", data, { // receive two parameter endpoint url ,form data\n })\n .then(res => { // then print response status\n //console.log(res.statusText)\n if (res.statusText == 'OK') {\n alert(\"正常にアップロードされました\");\n }\n });\n }\n else {\n alert(\"指定されたファイル名\" + file.name + \"が間違っています。ini_工程内検査表.xlsx または ini_データ入力シート.xlsx のどちらかに名前を変更してください。\");\n return\n }\n //console.log(file.name);\n //console.log('calling upload');\n\n }\n\n return ( <\n div >\n <\n CCard >\n <\n CCardHeader >\n アップロード <\n /CCardHeader> <\n CCardBody >\n <\n CFormGroup row >\n <\n CCol md = \"3\" >\n <\n CLabel htmlFor = \"date-input\" > アップロードするファイルを選んでください < /CLabel> < /\n CCol > <\n CCol xs = \"12\"\n md = \"9\" >\n <\n CInputFile type = \"file\"\n onChange = { onChangeHandler }\n id = \"file-input\"\n name = \"file-input\" / >\n <\n /CCol> < /\n CFormGroup >\n \n < CIcon name = \"cil-scrubber\" / > アップロード < /CButton> < /\n CCardFooter>\n \n \n \n )\n}\n\nexport default Uploader\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/static/js/runtime-main.d854c4ea.js b/build/static/js/runtime-main.9e5a7d84.js similarity index 61% rename from build/static/js/runtime-main.d854c4ea.js rename to build/static/js/runtime-main.9e5a7d84.js index 21a6a3f..cd23d98 100644 --- a/build/static/js/runtime-main.d854c4ea.js +++ b/build/static/js/runtime-main.9e5a7d84.js @@ -1,2 +1,2 @@ -!function(e){function t(t){for(var n,o,u=t[0],i=t[1],f=t[2],l=0,s=[];l