Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ <h3 class="block md:hidden mt-2 text-center text-2xl text-primary-100 dark:text-
</svg>
</button>
@if(currentStep === 1){
<button data-cy=catalogFinish (click)="createCatalog()"
<button data-cy="catalogFinish" (click)="createCatalog()"
[disabled]="!generalForm.valid || loading"
[ngClass]="loading || !generalForm.valid ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Create Catalog
{{ 'CREATE_CATALOG._create' | translate }}
</button>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h3 class="block md:hidden mt-2 text-center text-2xl text-primary-100 dark:text-
[ngClass]="loading || !generalForm.valid ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Update Catalogue
{{ 'UPDATE_CATALOG._update' | translate }}
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,8 @@ <h4 class="text-lg font-bold ml-4 dark:text-white">{{ 'CREATE_PROD_SPEC._add_att
{{ 'CREATE_OFFER._previous' | translate }}
</button>

<button (click)="goToStep(currentStep + 1)"
<button data-cy="btnNext"
(click)="goToStep(currentStep + 1)"
[disabled]="currentStep === steps.length - 1 || !validateCurrentStep() || !canNavigate(currentStep) || isStepDisabled()"
[ngClass]="{
'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white': currentStep !== steps.length - 1 && (validateCurrentStep() || canNavigate(currentStep)),
Expand All @@ -1577,12 +1578,13 @@ <h4 class="text-lg font-bold ml-4 dark:text-white">{{ 'CREATE_PROD_SPEC._add_att
</svg>
</button>
@if ((currentStep === 7 && !BUNDLE_ENABLED) || (currentStep === 8 && BUNDLE_ENABLED)) {
<button (click)="createProduct()"
<button data-cy="btnCreateProduct"
(click)="createProduct()"
[disabled]="isStepDisabled() || loading"
[ngClass]="loading || isStepDisabled() ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Create Product
{{ 'CREATE_PROD_SPEC._create_prod' | translate }}
</button>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,8 @@ <h4 class="text-lg font-bold ml-4 dark:text-white">{{ 'UPDATE_PROD_SPEC._add_att
{{ 'CREATE_OFFER._previous' | translate }}
</button>

<button (click)="goToStep(currentStep + 1)"
<button data-cy="btnNext"
(click)="goToStep(currentStep + 1)"
[disabled]="currentStep === steps.length - 1 || !canNavigate(currentStep) || isStepDisabled()"
[ngClass]="{
'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white': currentStep !== steps.length - 1 && (validateCurrentStep() || canNavigate(currentStep)),
Expand All @@ -1647,12 +1648,12 @@ <h4 class="text-lg font-bold ml-4 dark:text-white">{{ 'UPDATE_PROD_SPEC._add_att
256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/>
</svg>
</button>
<button (click)="updateProduct()"
<button data-cy="productSpecUpdate" (click)="updateProduct()"
[disabled]="isStepDisabled() || loading"
[ngClass]="loading || isStepDisabled() ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Update Product
{{ 'UPDATE_PROD_SPEC._update_prod' | translate }}
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'CR
{{ 'CREATE_OFFER._previous' | translate }}
</button>

<button (click)="goToStep(currentStep + 1)"
<button data-cy="resSpecNext"
(click)="goToStep(currentStep + 1)"
[disabled]="currentStep === steps.length - 1 || !validateCurrentStep() || !canNavigate(currentStep)"
[ngClass]="{
'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white': currentStep !== steps.length - 1 && (validateCurrentStep() || canNavigate(currentStep)),
Expand All @@ -459,12 +460,13 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'CR
</svg>
</button>
@if (currentStep === 2) {
<button (click)="createResource()"
<button data-cy="resSpecFinish"
(click)="createResource()"
[disabled]="!generalForm.valid || loading"
[ngClass]="loading || !generalForm.valid ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Create Resource
{{ 'CREATE_RES_SPEC._create_res' | translate }}
</button>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'UP
{{ 'CREATE_OFFER._previous' | translate }}
</button>

<button (click)="goToStep(currentStep + 1)"
<button data-cy="resSpecUpdateNext"
(click)="goToStep(currentStep + 1)"
[disabled]="currentStep === steps.length - 1 || !canNavigate(currentStep) || !generalForm.valid"
[ngClass]="{
'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white': currentStep !== steps.length - 1 && (validateCurrentStep() || canNavigate(currentStep)),
Expand All @@ -536,12 +537,13 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'UP
256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/>
</svg>
</button>
<button (click)="updateResource()"
<button data-cy="resourceSpecUpdate"
(click)="updateResource()"
[disabled]="!generalForm.valid || loading"
[ngClass]="loading || !generalForm.valid ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Update Resource
{{ 'UPDATE_RES_SPEC._update_res' | translate }}
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'CR
{{ 'CREATE_OFFER._previous' | translate }}
</button>

<button (click)="goToStep(currentStep + 1)"
<button data-cy="servSpecNext"
(click)="goToStep(currentStep + 1)"
[disabled]="currentStep === steps.length - 1 || !validateCurrentStep() || !canNavigate(currentStep)"
[ngClass]="{
'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white': currentStep !== steps.length - 1 && (validateCurrentStep() || canNavigate(currentStep)),
Expand All @@ -460,12 +461,14 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'CR
</svg>
</button>
@if (currentStep === 2) {
<button (click)="createService()"
<button
data-cy="servSpecFinish"
(click)="createService()"
[disabled]="!generalForm.valid || loading"
[ngClass]="loading || !generalForm.valid ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Create Service
{{ 'CREATE_SERV_SPEC._create_serv' | translate }}
</button>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'UP
{{ 'CREATE_OFFER._previous' | translate }}
</button>

<button (click)="goToStep(currentStep + 1)"
<button data-cy="servSpecUpdateNext"
(click)="goToStep(currentStep + 1)"
[disabled]="currentStep === steps.length - 1 || !canNavigate(currentStep) || !generalForm.valid"
[ngClass]="{
'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white': currentStep !== steps.length - 1 && (validateCurrentStep() || canNavigate(currentStep)),
Expand All @@ -536,12 +537,13 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white pb-4">{{ 'UP
256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/>
</svg>
</button>
<button (click)="updateService()"
<button data-cy="serviceSpecUpdate"
(click)="updateService()"
[disabled]="!generalForm.valid || loading"
[ngClass]="loading || !generalForm.valid ? 'opacity-50' : 'hover:bg-primary-50'"

class="px-4 py-2 text-base font-medium text-white rounded-lg bg-primary-100">
Update Service
{{ 'UPDATE_SERV_SPEC._update_serv' | translate }}
</button>
</div>
</div>
Expand Down
Loading