|
1 | 1 | <div class="space-y-6"> |
2 | 2 | <!-- Section 1: Informações Básicas (Etapa 1) --> |
3 | | - @if (currentStep() === 0 || currentStep() === 1) { |
4 | | - <app-product-basic-info-section |
5 | | - [formName]="form().name" |
6 | | - [formSlug]="form().slug" |
7 | | - [formShortDescription]="form().shortDescription" |
8 | | - [formDescription]="form().description" |
9 | | - [isReadOnly]="isReadOnly()" |
10 | | - [isCreateMode]="isCreateMode()" |
11 | | - [errors]="errors()" |
12 | | - (fieldChange)="onFieldChange($event.field, $event.value)" |
13 | | - (descriptionChange)="descriptionChange.emit($event)" |
14 | | - /> |
| 3 | + @if ((currentStep() === 0 && activeTab() === 'geral') || currentStep() === 1) { |
| 4 | + <app-product-basic-info-section |
| 5 | + [formName]="form().name" |
| 6 | + [formSlug]="form().slug" |
| 7 | + [formShortDescription]="form().shortDescription" |
| 8 | + [formDescription]="form().description" |
| 9 | + [isReadOnly]="isReadOnly()" |
| 10 | + [isCreateMode]="isCreateMode()" |
| 11 | + [errors]="errors()" |
| 12 | + (fieldChange)="onFieldChange($event.field, $event.value)" |
| 13 | + (descriptionChange)="descriptionChange.emit($event)" |
| 14 | + /> |
15 | 15 | } |
16 | 16 |
|
17 | 17 | <!-- Section 2: Identificação & Classificação (Etapa 2) --> |
18 | | - @if (currentStep() === 0 || currentStep() === 2) { |
19 | | - <app-product-identification-section |
20 | | - [formCategoryId]="form().categoryId" |
21 | | - [formManufacturerId]="form().manufacturerId" |
22 | | - [formPartOriginId]="form().partOriginId" |
23 | | - [formStatusId]="form().statusId" |
24 | | - [formInternalCode]="form().internalCode" |
25 | | - [formBarcode]="form().barcode" |
26 | | - [isReadOnly]="isReadOnly()" |
27 | | - [isCreateMode]="isCreateMode()" |
28 | | - [errors]="errors()" |
29 | | - [categoryOptions]="options().categoryOptions" |
30 | | - [categoryLoading]="options().categoryLoading" |
31 | | - [manufacturerOptions]="options().manufacturerOptions" |
32 | | - [manufacturerLoading]="options().manufacturerLoading" |
33 | | - [partOriginOptions]="options().partOriginOptions" |
34 | | - [statusOptions]="options().statusOptions" |
35 | | - (fieldChange)="onFieldChange($event.field, $event.value)" |
36 | | - (categorySearch)="categorySearch.emit($event)" |
37 | | - (manufacturerSearch)="manufacturerSearch.emit($event)" |
38 | | - /> |
| 18 | + @if ((currentStep() === 0 && activeTab() === 'classification') || currentStep() === 2) { |
| 19 | + <app-product-identification-section |
| 20 | + [formCategoryId]="form().categoryId" |
| 21 | + [formManufacturerId]="form().manufacturerId" |
| 22 | + [formPartOriginId]="form().partOriginId" |
| 23 | + [formStatusId]="form().statusId" |
| 24 | + [formInternalCode]="form().internalCode" |
| 25 | + [formBarcode]="form().barcode" |
| 26 | + [isReadOnly]="isReadOnly()" |
| 27 | + [isCreateMode]="isCreateMode()" |
| 28 | + [errors]="errors()" |
| 29 | + [categoryOptions]="options().categoryOptions" |
| 30 | + [categoryLoading]="options().categoryLoading" |
| 31 | + [manufacturerOptions]="options().manufacturerOptions" |
| 32 | + [manufacturerLoading]="options().manufacturerLoading" |
| 33 | + [partOriginOptions]="options().partOriginOptions" |
| 34 | + [statusOptions]="options().statusOptions" |
| 35 | + (fieldChange)="onFieldChange($event.field, $event.value)" |
| 36 | + (categorySearch)="categorySearch.emit($event)" |
| 37 | + (manufacturerSearch)="manufacturerSearch.emit($event)" |
| 38 | + /> |
39 | 39 | } |
40 | 40 |
|
41 | 41 | <!-- Section 3 & 4: Especificações & Visibilidade (Etapa 3) --> |
42 | | - @if (currentStep() === 0 || currentStep() === 3) { |
43 | | - <app-product-dimensions-section |
44 | | - [formUnitId]="form().unitId" |
45 | | - [formWeight]="form().weight" |
46 | | - [formHeight]="form().height" |
47 | | - [formWidth]="form().width" |
48 | | - [formLength]="form().length" |
49 | | - [isReadOnly]="isReadOnly()" |
50 | | - [unitOptions]="options().unitOptions" |
51 | | - (fieldChange)="onFieldChange($event.field, $event.value)" |
52 | | - (numberFieldChange)="onNumberFieldChange($event.field, $event.value)" |
53 | | - /> |
| 42 | + @if ((currentStep() === 0 && activeTab() === 'logistics') || currentStep() === 3) { |
| 43 | + <app-product-dimensions-section |
| 44 | + [formUnitId]="form().unitId" |
| 45 | + [formWeight]="form().weight" |
| 46 | + [formHeight]="form().height" |
| 47 | + [formWidth]="form().width" |
| 48 | + [formLength]="form().length" |
| 49 | + [isReadOnly]="isReadOnly()" |
| 50 | + [unitOptions]="options().unitOptions" |
| 51 | + (fieldChange)="onFieldChange($event.field, $event.value)" |
| 52 | + (numberFieldChange)="onNumberFieldChange($event.field, $event.value)" |
| 53 | + /> |
54 | 54 |
|
55 | | - <app-product-visibility-section |
56 | | - [formActive]="form().active" |
57 | | - [formFeatured]="form().featured" |
58 | | - [isReadOnly]="isReadOnly()" |
59 | | - [isCreateMode]="isCreateMode()" |
60 | | - (booleanFieldToggle)="onBooleanFieldToggle($event.field, $event.currentValue)" |
61 | | - /> |
| 55 | + <app-product-visibility-section |
| 56 | + [formActive]="form().active" |
| 57 | + [formFeatured]="form().featured" |
| 58 | + [isReadOnly]="isReadOnly()" |
| 59 | + [isCreateMode]="isCreateMode()" |
| 60 | + (booleanFieldToggle)="onBooleanFieldToggle($event.field, $event.currentValue)" |
| 61 | + /> |
62 | 62 | } |
63 | 63 | </div> |
0 commit comments