Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOM import #273

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@
"boms": {
"header": {
"description": "Die Stückliste ermöglicht es Ihnen, den Lagerbestand pro Projekt zu verwalten. Sie können die Mengen für jede hergestellte Leiterplatte reduzieren, und überprüfen welche Teile Sie in höherer Stückzahl kaufen müssen um die Kosten zu analysieren.<br/><br/>Wählen Sie das Projekt aus, für das Sie die Stückliste (BOM) verwalten möchten, oder erstellen Sie ein neues Projekt.<br/>"
},
"acceptedFileTypes": "Accepted file types: \"*.xls, *.xlsx, *.csv\""
replaysMike marked this conversation as resolved.
Show resolved Hide resolved
"import": {
"success": "BOM Imported!",
"failure": "Failed to import BOM!"
}
},
"partTypes": {
Expand Down Expand Up @@ -636,6 +641,7 @@
},
"button": {
"addBomProject": "Stücklistenprojekt hinzufügen",
"importBomProject": "Import BOM Project",
"addPart": "Bauteil hinzufügen",
"save": "Speichern",
"download": "Download",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
"boms": {
"header": {
"description": "Bill of Materials, or BOM allows you to manage inventory quantities per project. You can reduce quantities for each PCB you produce, check which parts you need to buy more of and analyze costs.<br/><br/>Choose or create the project to manage BOM for.<br/>"
},
"acceptedFileTypes": "Accepted file types: \"*.xls, *.xlsx, *.csv\""
"import": {
"success": "BOM Imported!",
"failure": "Failed to import BOM!"
}
},
"partTypes": {
Expand Down Expand Up @@ -638,6 +643,7 @@
},
"button": {
"addBomProject": "Add BOM Project",
"importBomProject": "Import BOM Project",
"addPart": "Add Part",
"save": "Save",
"download": "Download",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"boms": {
"header": {
"description": "Bill of Materials, or BOM allows you to manage inventory quantities per project. You can reduce quantities for each PCB you produce, check which parts you need to buy more of and analyze costs.<br/><br/>Choose or create the project to manage BOM for.<br/>"
},
"acceptedFileTypes": "Accepted file types: \"*.xls, *.xlsx, *.csv\""
"import": {
"success": "BOM Imported!",
"failure": "Failed to import BOM!"
}
},
"partTypes": {
Expand Down Expand Up @@ -457,6 +462,7 @@
},
"button": {
"addBomProject": "Add BOM Project",
"importBomProject": "Import BOM Project",
"addPart": "Add Part",
"save": "Save",
"download": "Download",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"boms": {
"header": {
"description": "Bill of Materials, or BOM allows you to manage inventory quantities per project. You can reduce quantities for each PCB you produce, check which parts you need to buy more of and analyze costs.<br/><br/>Choose or create the project to manage BOM for.<br/>"
},
"acceptedFileTypes": "Accepted file types: \"*.xls, *.xlsx, *.csv\""
"import": {
"success": "BOM Imported!",
"failure": "Failed to import BOM!"
}
},
"partTypes": {
Expand Down Expand Up @@ -457,6 +462,7 @@
},
"button": {
"addBomProject": "Add BOM Project",
"importBomProject": "Import BOM Project",
"addPart": "Add Part",
"save": "Save",
"download": "Download",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
"boms": {
"header": {
"description": "La Distinta Base, (DBA), consente di gestire le quantità dei componenti per progetto. Si può ridurre le quantità di ogni PCB da produrre, verificare quali componenti occorre acquistare ancora e analizzare i costi.<br/><br/>Scegliere o creare il progetto di cui gestire la DBA.<br/>"
},
"acceptedFileTypes": "Accepted file types: \"*.xls, *.xlsx, *.csv\""
"import": {
"success": "BOM Imported!",
"failure": "Failed to import BOM!"
}
},
"partTypes": {
Expand Down Expand Up @@ -635,6 +640,7 @@
},
"button": {
"addBomProject": "Aggiungi un Progetto DBA",
"importBomProject": "Import BOM Project",
"addPart": "Aggiungi componente",
"save": "Salva",
"download": "Download",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
"boms": {
"header": {
"description": "你可以使用物料清单工具,按照项目来管理零部件。你可以直接按照PCB板的套数扣除对应零件数量,或者检查还需要购买哪些零件以及分析成本。<br/><br/>请选择或创建需要管理BOM的项目。<br/>"
},
"acceptedFileTypes": "Accepted file types: \"*.xls, *.xlsx, *.csv\""
"import": {
"success": "BOM Imported!",
"failure": "Failed to import BOM!"
}
},
"partTypes": {
Expand Down Expand Up @@ -468,6 +473,7 @@
},
"button": {
"addBomProject": "创建BOM工程文件",
"importBomProject": "Import BOM Project",
"addPart": "添加部件",
"save": "保存",
"download": "下载",
Expand Down
12 changes: 3 additions & 9 deletions Binner/Binner.Web/ClientApp/src/pages/Boms.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export function Boms (props) {
const [confirmPartDeleteContent, setConfirmProjectDeleteContent] = useState(null);
const [confirmDeleteSelectedProject, setConfirmDeleteSelectedProject] = useState(null);
const [acceptedFile, setAcceptedFile] = useState(null);
const [error, setError] = useState(null);

const [colors] = useState(_.map(ProjectColors, function (c) {
return {
Expand Down Expand Up @@ -193,13 +192,13 @@ export function Boms (props) {
.then((response) => {
toast.dismiss();
if (response.status === 200) {
toast.success(t("importProjectSuccess", "BOM Imported!"));
toast.success(t("page.boms.import.success", "BOM Imported!"));
setProject(defaultProject);
setAddVisible(false);
setImportVisible(false);
loadProjects(page, pageSize, true);
} else {
toast.error(t("importProjectFailed", `Failed to import BOM!`), { autoClose: 10000 });
toast.error(t("page.boms.import.failure", `Failed to import BOM!`), { autoClose: 10000 });
}
});
});
Expand Down Expand Up @@ -373,13 +372,8 @@ export function Boms (props) {
>
<span style={{ fontSize: "0.6em" }}>{t('page.exportData.uploadNote', "Drag a document to upload, or click to select files")}</span>
<input {...getInputProps()} />
<div style={{ fontSize: "0.6em" }}>{t('page.projects.acceptedFileTypes', "Accepted file types: \"*.xls, *.xlsx, *.csv\"")}</div>
<div style={{ fontSize: "0.6em" }}>{t('page.boms.acceptedFileTypes', "Accepted file types: \"*.xls, *.xlsx, *.csv\"")}</div>
</div>
{error && (
<div className="error small">
<b>{t('label.error', "Error")}:</b> {error}
</div>
)}
<aside>
<ol>
{acceptedFile &&
Expand Down