|
|
@@ -13,12 +13,26 @@
|
|
|
>
|
|
|
</ng-select>
|
|
|
</vdr-form-field>
|
|
|
+ <clr-alert
|
|
|
+ *ngIf="product.optionGroups.length === 0"
|
|
|
+ clrAlertType="warning"
|
|
|
+ [clrAlertClosable]="false"
|
|
|
+ class="form-grid-span"
|
|
|
+ >
|
|
|
+ <clr-alert-item>
|
|
|
+ <span class="alert-text">
|
|
|
+ {{ 'catalog.cannot-create-variants-without-options' | translate }}
|
|
|
+ </span>
|
|
|
+ </clr-alert-item>
|
|
|
+ </clr-alert>
|
|
|
</div>
|
|
|
<div *ngIf="existingVariant" class="mt-2">
|
|
|
<clr-alert clrAlertType="warning" [clrAlertClosable]="false" class="">
|
|
|
<clr-alert-item>
|
|
|
<span class="alert-text">
|
|
|
- {{ 'catalog.product-variant-exists' | translate }}: {{ existingVariant.name }} ({{ existingVariant.sku }})
|
|
|
+ {{ 'catalog.product-variant-exists' | translate }}: {{ existingVariant.name }} ({{
|
|
|
+ existingVariant.sku
|
|
|
+ }})
|
|
|
</span>
|
|
|
</clr-alert-item>
|
|
|
</clr-alert>
|
|
|
@@ -38,7 +52,7 @@
|
|
|
type="submit"
|
|
|
(click)="confirm()"
|
|
|
class="btn btn-primary"
|
|
|
- [disabled]="form.invalid || existingVariant"
|
|
|
+ [disabled]="form.invalid || existingVariant || product.optionGroups.length === 0"
|
|
|
>
|
|
|
{{ 'common.confirm' | translate }}
|
|
|
</button>
|