How to use the @covalent/core.StepState.Complete function in @covalent/core

To help you get started, we’ve selected a few @covalent/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cyclosproject / cyclos4-ui / src / app / shared / linear-stepper-control.component.ts View on Github external
private doActivate(step: TdStepComponent) {
    // Disable all steps greater than the current step
    const steps = this.stepper.steps;
    const index = steps.indexOf(step);
    const disabled = this.disabledSteps.value;
    for (let i = 0; i < steps.length; i++) {
      const current = steps[i];
      current.disabled = disabled.has(current) || i > index;
      if (i > index) {
        current.state = StepState.None;
      } else if (i < index) {
        if (this.disabledSteps.value.has(current)) {
          current.state = StepState.None;
        } else {
          current.state = StepState.Complete;
        }
      }
    }
    step.state = StepState.None;
    step.open();
  }
}
github saurabh1e / open-pos / src / app / stock-management / add-stock / add-stock.component.ts View on Github external
setShop(data: RetailShop) {
    this.shop = data;
    this.stateStep1 = StepState.Complete;
    this.state = 2;

  }
github nhsconnect / careconnect-reference-implementation / ccri-management-app / src / main / web / src / app / modules / hie / patient-find / patient-find.component.ts View on Github external
}

    triageFormGroup: FormGroup;

    yesno = [
        {name: 'Yes', viewValue: 0},
        {name: 'No', viewValue: 1}
    ];
    sexes = [
        {name: 'Female', viewValue: 'female'},
        {name: 'Male', viewValue: 'male'}
    ];

    activeDeactiveStep1Msg: string = 'No select/deselect detected yet';
    stateStep2: StepState = StepState.Required;
    stateStep3: StepState = StepState.Complete;
    disabled: boolean = false;

    toggleRequiredStep2(): void {
        this.stateStep2 = (this.stateStep2 === StepState.Required ? StepState.None : StepState.Required);
    }

    toggleCompleteStep3(): void {
        this.stateStep3 = (this.stateStep3 === StepState.Complete ? StepState.None : StepState.Complete);
    }

    activeStep1Event(): void {
        this.activeDeactiveStep1Msg = 'Active event emitted.';
    }

    deactiveStep1Event(): void {
        this.activeDeactiveStep1Msg = 'Deactive event emitted.';