-
Notifications
You must be signed in to change notification settings - Fork 482
/
product-type-mutation.component.html
115 lines (115 loc) · 2.75 KB
/
product-type-mutation.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<nb-card class="main">
<nb-card-header class="d-flex">
<h5>
{{
(productType
? 'INVENTORY_PAGE.EDIT_PRODUCT_TYPE'
: 'INVENTORY_PAGE.ADD_PRODUCT_TYPE'
) | translate
}}
</h5>
<nb-icon
class="ml-auto mt-1 close"
icon="close-outline"
(click)="dialogRef.close()"
></nb-icon>
</nb-card-header>
<nb-card-body>
<form [formGroup]="form" *ngIf="form">
<div class="form-group mb-3">
<label class="label" for="lang">
{{ 'INVENTORY_PAGE.LANGUAGE' | translate }}
</label>
<nb-select
id="lang"
[placeholder]="'INVENTORY_PAGE.LANGUAGE' | translate"
class="d-block"
size="medium"
fullWidth="true"
formControlName="languageCode"
[selected]="selectedLanguage"
(selectedChange)="onLangChange($event)"
>
<nb-option
*ngFor="let lang of languages"
[value]="lang.value"
>
{{ lang.name }}
</nb-option>
</nb-select>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-4 mb-4">
<label class="label" for="nameInput">
{{ 'INVENTORY_PAGE.NAME' | translate }}
</label>
<ng-select
class="icon-select"
[clearable]="false"
[items]="icons"
bindLabel="name"
[placeholder]="'INVENTORY_PAGE.ICON' | translate"
id="organizationId"
[(ngModel)]="selectedIcon"
[ngModelOptions]="{ standalone: true }"
>
<ng-template
ng-option-tmp
let-item="item"
let-index="index"
>
<nb-icon [icon]="item"></nb-icon>
</ng-template>
<ng-template ng-label-tmp let-item="item">
<div class="selector-template">
<nb-icon [icon]="item"></nb-icon>
</div>
</ng-template>
</ng-select>
</div>
<div class="col-sm-8 mb-4 flex-end">
<input
fullWidth
id="nameInput"
type="text"
nbInput
formControlName="name"
[placeholder]="'INVENTORY_PAGE.NAME' | translate"
/>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label class="label" for="description">{{
'INVENTORY_PAGE.DESCRIPTION' | translate
}}</label>
<textarea
fullWidth
id="description"
type="text"
nbInput
formControlName="description"
[placeholder]="
'INVENTORY_PAGE.DESCRIPTION' | translate
"
></textarea>
</div>
</div>
</div>
</form>
</nb-card-body>
<nb-card-footer class="text-right">
<button
(click)="dialogRef.close()"
status="danger"
class="mr-2"
nbButton
>
{{ 'BUTTONS.CANCEL' | translate }}
</button>
<button status="success" nbButton (click)="onSaveRequest()">
{{ 'BUTTONS.SAVE' | translate }}
</button>
</nb-card-footer>
</nb-card>