project store : fix setStatus
This commit is contained in:
parent
837b741c47
commit
1398da62be
3 changed files with 4 additions and 6 deletions
|
|
@ -13,13 +13,11 @@ export const useProjectStore = defineStore("project", () => {
|
|||
physicalSample: "Échantillon physique",
|
||||
};
|
||||
|
||||
function setStatus(steps, step) {
|
||||
const currentStepId = page.content.currentstep;
|
||||
|
||||
function setStatus(steps, currentStepId, targetStep) {
|
||||
const currentStepIndex = steps.findIndex(
|
||||
(item) => item.id === currentStepId
|
||||
);
|
||||
const stepIndex = steps.findIndex((item) => item.id === step.id);
|
||||
const stepIndex = steps.findIndex((item) => item.id === targetStep.id);
|
||||
|
||||
if (currentStepIndex === stepIndex) {
|
||||
return "in-progress";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue