fix apertura blocchetti da categorie
This commit is contained in:
@@ -18,5 +18,7 @@ declare module server {
|
||||
terminated: boolean;
|
||||
running: boolean;
|
||||
hasError: boolean;
|
||||
category: string;
|
||||
subCategory_1: string;
|
||||
}
|
||||
}
|
||||
|
||||
+29
-23
@@ -86,39 +86,45 @@ export default class GanttComponent extends Vue {
|
||||
|
||||
|
||||
openModal() {
|
||||
switch (this.blockType) {
|
||||
case "movement": this.showModalAtStep(2); break;
|
||||
case "heating": this.showModalAtStep(3); break;
|
||||
case "drawing": this.showModalAtStep(5); break;
|
||||
case "vacuum": this.showModalAtStep(8); break;
|
||||
case "cooling": this.showModalAtStep(7); break;
|
||||
case "extraction": this.showModalAtStep(9); break;
|
||||
}
|
||||
if (this.value.category)
|
||||
switch (this.value.category.toLowerCase()) {
|
||||
case "general": this.showModalAtStep(0, this.value.subCategory_1); break;
|
||||
case "positions": this.showModalAtStep(1, this.value.subCategory_1); break;
|
||||
case "cycle": this.showModalAtStep(2, this.value.subCategory_1); break;
|
||||
case "heats": this.showModalAtStep(3, this.value.subCategory_1); break;
|
||||
case "pyrometer": this.showModalAtStep(4, this.value.subCategory_1); break;
|
||||
case "drawing": this.showModalAtStep(5, this.value.subCategory_1); break;
|
||||
case "upperplate": this.showModalAtStep(6, this.value.subCategory_1); break;
|
||||
case "cooling": this.showModalAtStep(7, this.value.subCategory_1); break;
|
||||
case "vacuum": this.showModalAtStep(8, this.value.subCategory_1); break;
|
||||
case "extraction": this.showModalAtStep(9, this.value.subCategory_1); break;
|
||||
case "options": this.showModalAtStep(10, this.value.subCategory_1); break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async showModalAtStep(step: number) {
|
||||
async showModalAtStep(step: number, subcategory: string) {
|
||||
try {
|
||||
let next = await this.showModalStep(step);
|
||||
let next = await this.showModalStep(step, subcategory);
|
||||
if (next == null) return;
|
||||
this.showModalAtStep(step + next);
|
||||
this.showModalAtStep(step + next, null);
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
showModalStep(step: number): Promise<number> {
|
||||
showModalStep(step: number, subcategory: string): Promise<number> {
|
||||
switch (step) {
|
||||
case 0: return ModalHelper.ShowModalAsync(ShowFormatoInfo);
|
||||
case 1: return ModalHelper.ShowModalAsync(ShowQuoteVelocitaInfo);
|
||||
case 2: return ModalHelper.ShowModalAsync(ShowCicloInfo);
|
||||
case 3: return ModalHelper.ShowModalAsync(ShowRiscaldamentoInfo);
|
||||
case 4: return ModalHelper.ShowModalAsync(ShowPirometroInfo);
|
||||
case 5: return ModalHelper.ShowModalAsync(ShowImbutituraInfo);
|
||||
case 6: return ModalHelper.ShowModalAsync(ShowControstampoInfo);
|
||||
case 7: return ModalHelper.ShowModalAsync(ShowRaffreddamentoInfo);
|
||||
case 8: return ModalHelper.ShowModalAsync(ShowVuotoInfo);
|
||||
case 9: return ModalHelper.ShowModalAsync(ShowEstrazioneInfo);
|
||||
case 10: return ModalHelper.ShowModalAsync(ShowOpzioniInfo);
|
||||
case 0: return ModalHelper.ShowModalAsync(ShowFormatoInfo, { subcategory });
|
||||
case 1: return ModalHelper.ShowModalAsync(ShowQuoteVelocitaInfo, { subcategory });
|
||||
case 2: return ModalHelper.ShowModalAsync(ShowCicloInfo, { subcategory });
|
||||
case 3: return ModalHelper.ShowModalAsync(ShowRiscaldamentoInfo, { subcategory });
|
||||
case 4: return ModalHelper.ShowModalAsync(ShowPirometroInfo, { subcategory });
|
||||
case 5: return ModalHelper.ShowModalAsync(ShowImbutituraInfo, { subcategory });
|
||||
case 6: return ModalHelper.ShowModalAsync(ShowControstampoInfo, { subcategory });
|
||||
case 7: return ModalHelper.ShowModalAsync(ShowRaffreddamentoInfo, { subcategory });
|
||||
case 8: return ModalHelper.ShowModalAsync(ShowVuotoInfo, { subcategory });
|
||||
case 9: return ModalHelper.ShowModalAsync(ShowEstrazioneInfo, { subcategory });
|
||||
case 10: return ModalHelper.ShowModalAsync(ShowOpzioniInfo, { subcategory });
|
||||
// case 11: return ModalHelper.ShowModalAsync(AvvioProduzione);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user