-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sub-section form for variant
- Loading branch information
Showing
10 changed files
with
309 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
packages/modules/product/src/lib/components/forms/product-files-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
template: ` | ||
<vcl-form-control-group> | ||
<vcl-label>Filename</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Caption</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>URL</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Content type</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>File index</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
`, | ||
selector: 'app-module-product-file-form', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProductFileFormComponent { | ||
@HostBinding('class') className = 'w-100p'; | ||
} |
66 changes: 66 additions & 0 deletions
66
packages/modules/product/src/lib/components/forms/product-image-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
template: ` | ||
<vcl-form-control-group> | ||
<vcl-label>Filename</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Caption</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>URL</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Content type</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Width</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Length</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Height</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Image index</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
`, | ||
selector: 'app-module-product-image-form', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProductImageFormComponent { | ||
@HostBinding('class') className = 'w-100p'; | ||
} |
42 changes: 42 additions & 0 deletions
42
packages/modules/product/src/lib/components/forms/product-package-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
template: ` | ||
<vcl-form-control-group> | ||
<vcl-label>Width</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Length</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Height</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Weight (kg)</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-checkbox formControlName="terms">Rotatable</vcl-checkbox> | ||
</vcl-form-control-group> | ||
`, | ||
selector: 'app-module-product-package-form', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProductPackageFormComponent { | ||
@HostBinding('class') className = 'w-100p'; | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/modules/product/src/lib/components/forms/product-price-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
template: ` | ||
<vcl-form-control-group> | ||
<vcl-label>Currency</vcl-label> | ||
<vcl-select> | ||
<vcl-select-list> | ||
<vcl-select-list-item value="usd"> USD </vcl-select-list-item> | ||
<vcl-select-list-item value="eur"> EURO </vcl-select-list-item> | ||
</vcl-select-list> | ||
</vcl-select> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Regular Price</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Sale Price</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-checkbox formControlName="terms"> Sale ? </vcl-checkbox> | ||
</vcl-form-control-group> | ||
`, | ||
selector: 'app-module-product-price-form', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProductPriceFormComponent { | ||
@HostBinding('class') className = 'w-100p'; | ||
} |
31 changes: 31 additions & 0 deletions
31
packages/modules/product/src/lib/components/forms/product-property-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
template: ` | ||
<vcl-form-control-group> | ||
<vcl-label>id</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>value</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Unit code</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
`, | ||
selector: 'app-module-product-props-form', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProductPropertyFormComponent { | ||
@HostBinding('class') className = 'w-100p'; | ||
} |
65 changes: 65 additions & 0 deletions
65
packages/modules/product/src/lib/components/forms/product-variant-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
template: ` | ||
<vcl-form-control-group> | ||
<vcl-label>Parent variant</vcl-label> | ||
<vcl-select> | ||
<vcl-select-list> | ||
<vcl-select-list-item value="variant-1" | ||
>Variant 1</vcl-select-list-item | ||
> | ||
</vcl-select-list> | ||
</vcl-select> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Name</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Description</vcl-label> | ||
<vcl-input-field class="auto-height"> | ||
<textarea | ||
vclInput | ||
[autogrow]="true" | ||
[minRows]="5" | ||
[maxRows]="10" | ||
></textarea> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Stock Level</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<vcl-form-control-group> | ||
<vcl-label>Stock Keeping Unit</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
<!-- Money section --> | ||
<app-module-product-price-form /> | ||
<!-- TODO Should be dynamic to accomodate additional taxes --> | ||
<vcl-form-control-group> | ||
<vcl-label>Tax Id</vcl-label> | ||
<vcl-input-field> | ||
<input vclInput /> | ||
</vcl-input-field> | ||
</vcl-form-control-group> | ||
`, | ||
selector: 'app-module-product-variant-form', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ProductVariantFormComponent { | ||
@HostBinding('class') className = 'w-100p'; | ||
} |
33 changes: 0 additions & 33 deletions
33
packages/modules/product/src/lib/components/product-variant-form.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters