-
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.
- Loading branch information
Showing
6 changed files
with
175 additions
and
356 deletions.
There are no files selected for viewing
211 changes: 0 additions & 211 deletions
211
packages/modules/product/src/lib/components/forms/product-creation-form.component.ts
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
packages/modules/product/src/lib/components/forms/product-price-form.component.ts
This file was deleted.
Oops, something went wrong.
65 changes: 0 additions & 65 deletions
65
packages/modules/product/src/lib/components/forms/product-variant-form.component.ts
This file was deleted.
Oops, something went wrong.
73 changes: 73 additions & 0 deletions
73
packages/modules/product/src/lib/jss-forms/product-image.jss-form-fields.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,73 @@ | ||
import { Validators } from '@angular/forms'; | ||
|
||
import { VCLFormFieldControlSchema, VCLFormFieldSchemas } from '@vcl/ng-vcl'; | ||
|
||
export const buildProductPriceFields: VCLFormFieldSchemas<VCLFormFieldControlSchema>[] = | ||
[ | ||
{ | ||
name: 'currencyId', | ||
label: 'Currency', | ||
type: 'select', | ||
// disabled: true, | ||
defaultValue: '', | ||
validators: [Validators.required], | ||
params: { | ||
placeholder: 'Select currency', | ||
selectionMode: 'single', | ||
clearable: false, | ||
search: false, | ||
options: [ | ||
{ | ||
label: 'USD', | ||
value: 'USD', | ||
}, | ||
{ | ||
label: 'EURO', | ||
value: 'EUR', | ||
}, | ||
], | ||
}, | ||
hints: [ | ||
{ | ||
type: 'error', | ||
error: 'required', | ||
message: 'This field is required.', | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'regularPrice', | ||
label: 'Regular price', | ||
type: 'input', | ||
validators: [Validators.required], | ||
defaultValue: '', | ||
params: {}, | ||
hints: [ | ||
{ | ||
type: 'error', | ||
error: 'required', | ||
message: 'This field is required.', | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'salePrice', | ||
label: 'Sale price', | ||
type: 'input', | ||
validators: [Validators.required], | ||
defaultValue: '', | ||
params: {}, | ||
hints: [ | ||
{ | ||
type: 'error', | ||
error: 'required', | ||
message: 'This field is required.', | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'checkbox', | ||
name: 'sales', | ||
label: 'On sales', | ||
}, | ||
]; |
Oops, something went wrong.