How to simulate progress bar when changing Thong?

I have an object with status, assume:
const validationProgressSteps: IterableObject<string[]> = {
firstStep: ['one', 'two'],
secondStep: ['three', 'four'],
thirdStep: ['five', 'six'],
fourthStep: ['seven', 'eight'],
}


From the server I get the same status, but you must first verify their identity with "validationProgressSteps" if the status is the same as for example "validationProgressSteps.firstStep" then for each match add + in peremennoy this.progressStatusBar so that she would in the first step was not more then 25 not more on the second 50, third 75, fourth 100. That is to simulate the Progress bar change status file. Please tell me how to invoke step 2, 3, 4 after the first ?
public handleValidationProgress(status: string, id: number): number {
 const fileInTable: FileTableItem | undefined = this.uploadedFiles.find
 ((item: FileTableItem) => item.fileId === id);
 if(fileInTable) {
 this.validationProgressSteps.firstStep.filter((item: string) => {
 if (status === item) {
 const progressBar = setInterval(() => {
 if (this.progressStatusBar === 30) {
clearInterval(progressBar);
 } else {
 this.progressStatusBar += 1;
}
 }, 1000);
}
});
}
 return this.progressStatusBar;
 }
March 19th 20 at 09:04
0 answer

Find more questions by tags Vue.jsTypeScriptJavaScript