oxpi-nglib 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/esm2020/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.mjs +3 -3
  2. package/esm2020/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.mjs +3 -3
  3. package/esm2020/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.mjs +79 -0
  4. package/esm2020/lib/cadastros/produtos/produto-busca-filtros-dialog/produto-busca-filtros-dialog.component.mjs +56 -0
  5. package/esm2020/lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component.mjs +68 -0
  6. package/esm2020/lib/cadastros/produtos/produto-form/produto-form.component.mjs +343 -0
  7. package/esm2020/lib/cadastros/produtos/produtos/produtos.component.mjs +211 -0
  8. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component.mjs +69 -0
  9. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component.mjs +68 -0
  10. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component.mjs +106 -0
  11. package/esm2020/lib/cadastros/produtos-categoria-cardapio/produtos-categorias-cardapio/produtos-categorias-cardapio.component.mjs +156 -0
  12. package/esm2020/lib/cadastros/produtos-grupos/mover-grupo-dialog/mover-grupo-dialog.component.mjs +65 -0
  13. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-add-dialog/produto-grupo-add-dialog.component.mjs +69 -0
  14. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-edit-dialog/produto-grupo-edit-dialog.component.mjs +68 -0
  15. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-form/produto-grupo-form.component.mjs +18 -0
  16. package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-selecao-dialog/produto-grupo-selecao-dialog.component.mjs +106 -0
  17. package/esm2020/lib/cadastros/produtos-grupos/produtos-grupos/produtos-grupos.component.mjs +179 -0
  18. package/esm2020/lib/cadastros/produtos-ncm-dialog/produtos-ncm-dialog.component.mjs +58 -0
  19. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/produto-subgrupo-add-dialog.component.mjs +71 -0
  20. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component.mjs +68 -0
  21. package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.mjs +106 -0
  22. package/esm2020/lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component.mjs +156 -0
  23. package/esm2020/lib/models/entidades/produto-grupo.mjs +9 -0
  24. package/esm2020/lib/models/entidades/produto-ncm.mjs +2 -0
  25. package/esm2020/lib/models/entidades/produto.mjs +106 -0
  26. package/esm2020/lib/models/entidades/setor-estoque.mjs +2 -0
  27. package/esm2020/lib/models/infra/number-parser.mjs +1 -1
  28. package/esm2020/lib/models/infra/selecao-utils.mjs +4 -2
  29. package/esm2020/lib/models/infra/validations.mjs +1 -1
  30. package/esm2020/lib/models/tuple.mjs +2 -0
  31. package/esm2020/lib/oxpi-nglib.module.mjs +69 -5
  32. package/esm2020/lib/providers/common-web-service.mjs +124 -2
  33. package/fesm2015/oxpi-nglib.mjs +2305 -206
  34. package/fesm2015/oxpi-nglib.mjs.map +1 -1
  35. package/fesm2020/oxpi-nglib.mjs +2284 -206
  36. package/fesm2020/oxpi-nglib.mjs.map +1 -1
  37. package/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.d.ts +28 -0
  38. package/lib/cadastros/produtos/produto-busca-filtros-dialog/produto-busca-filtros-dialog.component.d.ts +27 -0
  39. package/lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component.d.ts +27 -0
  40. package/lib/cadastros/produtos/produto-form/produto-form.component.d.ts +78 -0
  41. package/lib/cadastros/produtos/produtos/produtos.component.d.ts +44 -0
  42. package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component.d.ts +27 -0
  43. package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component.d.ts +27 -0
  44. package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component.d.ts +35 -0
  45. package/lib/cadastros/produtos-categoria-cardapio/produtos-categorias-cardapio/produtos-categorias-cardapio.component.d.ts +36 -0
  46. package/lib/cadastros/produtos-grupos/mover-grupo-dialog/mover-grupo-dialog.component.d.ts +21 -0
  47. package/lib/cadastros/produtos-grupos/produto-grupo-add-dialog/produto-grupo-add-dialog.component.d.ts +27 -0
  48. package/lib/cadastros/produtos-grupos/produto-grupo-edit-dialog/produto-grupo-edit-dialog.component.d.ts +27 -0
  49. package/lib/cadastros/produtos-grupos/produto-grupo-form/produto-grupo-form.component.d.ts +10 -0
  50. package/lib/cadastros/produtos-grupos/produto-grupo-selecao-dialog/produto-grupo-selecao-dialog.component.d.ts +35 -0
  51. package/lib/cadastros/produtos-grupos/produtos-grupos/produtos-grupos.component.d.ts +37 -0
  52. package/lib/cadastros/produtos-ncm-dialog/produtos-ncm-dialog.component.d.ts +29 -0
  53. package/lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/produto-subgrupo-add-dialog.component.d.ts +27 -0
  54. package/lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component.d.ts +28 -0
  55. package/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.d.ts +35 -0
  56. package/lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component.d.ts +36 -0
  57. package/lib/models/entidades/produto-grupo.d.ts +20 -0
  58. package/lib/models/entidades/produto-ncm.d.ts +10 -0
  59. package/lib/models/entidades/produto.d.ts +74 -0
  60. package/lib/models/entidades/setor-estoque.d.ts +7 -0
  61. package/lib/models/infra/number-parser.d.ts +1 -1
  62. package/lib/models/infra/selecao-utils.d.ts +1 -1
  63. package/lib/models/infra/validations.d.ts +3 -3
  64. package/lib/models/tuple.d.ts +4 -0
  65. package/lib/oxpi-nglib.module.d.ts +29 -8
  66. package/lib/providers/common-web-service.d.ts +38 -0
  67. package/package.json +1 -1
  68. package/styles/cadastros-listagens-form.scss +15 -0
@@ -1,25 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Component, Input, Inject, Output, HostListener, Pipe, NgModule } from '@angular/core';
3
- import * as i3$1 from '@angular/material/dialog';
3
+ import * as i3 from '@angular/material/dialog';
4
4
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
5
  import * as i1 from '@angular/common/http';
6
- import { HttpHeaders } from '@angular/common/http';
6
+ import { HttpParams, HttpHeaders, HttpEventType } from '@angular/common/http';
7
7
  import { map } from 'rxjs';
8
8
  import * as i1$1 from '@angular/material/snack-bar';
9
- import * as i1$2 from '@angular/common';
10
- import * as i2 from '@angular/material/button';
9
+ import * as i6 from '@angular/common';
10
+ import * as i6$1 from '@angular/material/button';
11
11
  import { MatButtonModule } from '@angular/material/button';
12
- import * as i7 from '@angular/material/icon';
12
+ import * as i7$1 from '@angular/material/icon';
13
13
  import { MatIconModule } from '@angular/material/icon';
14
- import * as i3 from '@angular/forms';
14
+ import * as i7 from '@angular/forms';
15
15
  import { FormsModule } from '@angular/forms';
16
16
  import * as i4 from '@angular/material/select';
17
17
  import { MatSelectModule } from '@angular/material/select';
18
18
  import * as i5 from '@angular/material/core';
19
19
  import { trigger, transition, style, animate } from '@angular/animations';
20
20
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
21
- import * as i1$3 from '@angular/platform-browser';
21
+ import * as i1$2 from '@angular/platform-browser';
22
22
  import { BrowserModule } from '@angular/platform-browser';
23
+ import * as i12 from '@angular/material/autocomplete';
24
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
23
25
  import * as FileSaver from 'file-saver';
24
26
 
25
27
  function valTextEmpty(v) {
@@ -41,7 +43,7 @@ function valNumberMin(v, min) {
41
43
  return v <= min;
42
44
  }
43
45
 
44
- function valida(item, focus) {
46
+ function valida$2(item, focus) {
45
47
  if (valTextEmpty(item.nome)) {
46
48
  focus.set('nome');
47
49
  return 'Digite um nome válido.';
@@ -126,9 +128,17 @@ class CommonWebService {
126
128
  constructor(http) {
127
129
  this.http = http;
128
130
  this.ROOT_URL = '';
131
+ this.GERENCIAL_URL = '';
129
132
  this.FUNCIONARIO_BASE_URL = '';
130
133
  this.FUNCIONARIO_CARGO_BASE_URL = '';
131
134
  this.token = '';
135
+ this.PRODUTO_BASE_URL = '';
136
+ this.PRODUTO_GRUPO_BASE_URL = '';
137
+ this.PRODUTO_SUBGRUPO_BASE_URL = '';
138
+ this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL = '';
139
+ this.ESTOQUE_URL = '';
140
+ this.MEDIA_BASE_URL = '';
141
+ this.MEDIA_PRODUTO_IMAGEM_URL = '';
132
142
  }
133
143
  setToken(token) {
134
144
  this.token = token;
@@ -137,6 +147,14 @@ class CommonWebService {
137
147
  this.ROOT_URL = rootUrl;
138
148
  this.FUNCIONARIO_BASE_URL = rootUrl + "Funcionario/";
139
149
  this.FUNCIONARIO_CARGO_BASE_URL = rootUrl + "FuncionarioCargo/";
150
+ this.PRODUTO_BASE_URL = rootUrl + "ProdutoFiscal/";
151
+ this.PRODUTO_GRUPO_BASE_URL = rootUrl + "ProdutoGrupo/";
152
+ this.PRODUTO_SUBGRUPO_BASE_URL = rootUrl + "ProdutoSubgrupo/";
153
+ this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL = rootUrl + "ProdutoCategoriaCardapio/";
154
+ this.ESTOQUE_URL = rootUrl + 'Estoque/';
155
+ this.GERENCIAL_URL = rootUrl + 'Gerencial/';
156
+ this.MEDIA_BASE_URL = this.GERENCIAL_URL + "Media/";
157
+ this.MEDIA_PRODUTO_IMAGEM_URL = this.GERENCIAL_URL + 'GetProdutoImagem/';
140
158
  }
141
159
  getFuncionarios() {
142
160
  const url = this.FUNCIONARIO_BASE_URL;
@@ -170,6 +188,112 @@ class CommonWebService {
170
188
  const url = this.FUNCIONARIO_BASE_URL + id;
171
189
  return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
172
190
  }
191
+ buscaPaginadaProdutos(setting, page, pageSize) {
192
+ const url = this.PRODUTO_BASE_URL + CommonWebService.URL_PART_BUSCA_PAGINADA;
193
+ const p = { setting: setting, page: page, pageSize: pageSize };
194
+ return this.http.post(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
195
+ }
196
+ getNextIdProduto() {
197
+ const url = this.PRODUTO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
198
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
199
+ }
200
+ saveProduto(s) {
201
+ const url = this.PRODUTO_BASE_URL;
202
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
203
+ }
204
+ addProduto(p) {
205
+ const url = this.PRODUTO_BASE_URL;
206
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
207
+ }
208
+ deleteProduto(id) {
209
+ const url = this.PRODUTO_BASE_URL + id;
210
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
211
+ }
212
+ buscaProdutoGrupo(setting) {
213
+ const url = this.PRODUTO_GRUPO_BASE_URL + CommonWebService.URL_PART_BUSCA;
214
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
215
+ }
216
+ getAllProdutoGrupo() {
217
+ const url = this.PRODUTO_GRUPO_BASE_URL;
218
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
219
+ }
220
+ getNextIdProdutoGrupo() {
221
+ const url = this.PRODUTO_GRUPO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
222
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
223
+ }
224
+ saveProdutoGrupo(s) {
225
+ const url = this.PRODUTO_GRUPO_BASE_URL;
226
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
227
+ }
228
+ transfereProdutoGrupo(grupoId, novoGrupoId) {
229
+ const url = this.PRODUTO_BASE_URL + 'AlteraGrupo';
230
+ const p = { oldId: grupoId, newId: novoGrupoId };
231
+ return this.http.post(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
232
+ }
233
+ addProdutoGrupo(p) {
234
+ const url = this.PRODUTO_GRUPO_BASE_URL;
235
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
236
+ }
237
+ deleteProdutoGrupo(id) {
238
+ const url = this.PRODUTO_GRUPO_BASE_URL + id;
239
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
240
+ }
241
+ buscaNcm(ncm) {
242
+ const url = this.PRODUTO_BASE_URL + 'BuscaNCM/';
243
+ const params = new HttpParams()
244
+ .set("ncm", '' + ncm);
245
+ return this.http.get(url, this.getHttpOptions(params)).pipe(map(data => data));
246
+ }
247
+ findNcm(ncm) {
248
+ const url = this.PRODUTO_BASE_URL + 'FindNCM/';
249
+ const params = new HttpParams()
250
+ .set("ncm", '' + ncm);
251
+ return this.http.get(url, this.getHttpOptions(params)).pipe(map(data => data));
252
+ }
253
+ buscaProdutoSubgrupo(setting) {
254
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL + CommonWebService.URL_PART_BUSCA;
255
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
256
+ }
257
+ getNextIdProdutoSubgrupo() {
258
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
259
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
260
+ }
261
+ saveProdutoSubgrupo(s) {
262
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL;
263
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
264
+ }
265
+ addProdutoSubgrupo(p) {
266
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL;
267
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
268
+ }
269
+ deleteProdutoSubgrupo(id) {
270
+ const url = this.PRODUTO_SUBGRUPO_BASE_URL + id;
271
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
272
+ }
273
+ buscaProdutoCategoriaCardapio(setting) {
274
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL + CommonWebService.URL_PART_BUSCA;
275
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
276
+ }
277
+ getNextIdProdutoCategoriaCardapio() {
278
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
279
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
280
+ }
281
+ saveProdutoCategoriaCardapio(s) {
282
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL;
283
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
284
+ }
285
+ addProdutoCategoriaCardapio(p) {
286
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL;
287
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
288
+ }
289
+ deleteProdutoCategoriaCardapio(id) {
290
+ const url = this.PRODUTO_CATEGORIA_CARDAPIO_BASE_URL + id;
291
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
292
+ }
293
+ getAllSetores() {
294
+ const url = this.ESTOQUE_URL + 'Setor/';
295
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
296
+ }
173
297
  getHttpOptions(parameters) {
174
298
  return {
175
299
  headers: new HttpHeaders({
@@ -344,7 +468,7 @@ class BusyIndicatorComponent {
344
468
  }
345
469
  }
346
470
  BusyIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
347
- BusyIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: { isBusy: "isBusy" }, ngImport: i0, template: "<div class=\"busy-indicator-container\" *ngIf=\"isBusy\">\n <div class=\"busy-indicator\"></div>\n</div>", styles: [".busy-indicator-container{position:fixed;left:50%;top:35%;text-align:center;z-index:1000;margin-left:-47px;background:rgb(255,255,255);border-radius:8px;padding:20px;border:solid 2px transparent;background-clip:padding-box;box-shadow:10px 10px 10px #2e364414}.busy-indicator{border:10px solid #e2e2e2;border-top:10px solid var(--app-color, black);border-radius:50%;width:50px;height:50px;animation:spin .5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
471
+ BusyIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: { isBusy: "isBusy" }, ngImport: i0, template: "<div class=\"busy-indicator-container\" *ngIf=\"isBusy\">\n <div class=\"busy-indicator\"></div>\n</div>", styles: [".busy-indicator-container{position:fixed;left:50%;top:35%;text-align:center;z-index:1000;margin-left:-47px;background:rgb(255,255,255);border-radius:8px;padding:20px;border:solid 2px transparent;background-clip:padding-box;box-shadow:10px 10px 10px #2e364414}.busy-indicator{border:10px solid #e2e2e2;border-top:10px solid var(--app-color, black);border-radius:50%;width:50px;height:50px;animation:spin .5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
348
472
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, decorators: [{
349
473
  type: Component,
350
474
  args: [{ selector: 'ox-busy-indicator', template: "<div class=\"busy-indicator-container\" *ngIf=\"isBusy\">\n <div class=\"busy-indicator\"></div>\n</div>", styles: [".busy-indicator-container{position:fixed;left:50%;top:35%;text-align:center;z-index:1000;margin-left:-47px;background:rgb(255,255,255);border-radius:8px;padding:20px;border:solid 2px transparent;background-clip:padding-box;box-shadow:10px 10px 10px #2e364414}.busy-indicator{border:10px solid #e2e2e2;border-top:10px solid var(--app-color, black);border-radius:50%;width:50px;height:50px;animation:spin .5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
@@ -374,7 +498,7 @@ class FuncionarioFormComponent {
374
498
  }
375
499
  }
376
500
  FuncionarioFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, deps: [{ token: CommonWebService }], target: i0.ɵɵFactoryTarget.Component });
377
- FuncionarioFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: { model: "model" }, ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
501
+ FuncionarioFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: { model: "model" }, ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
378
502
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, decorators: [{
379
503
  type: Component,
380
504
  args: [{ selector: 'ox-funcionario-form', template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"nome\">Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" tabindex=\"2\">\n</div>\n<div class=\"form-group\" *ngIf=\"model\">\n <label for=\"cargo\">Cargo</label>\n <mat-select id=\"cargo\" [(value)]=\"model.cargoId\" tabindex=\"2\"\n class=\"form-control input-300\" color=\"primary\">\n <mat-option *ngFor=\"let m of cargos\" [value]=\"m.id\">\n {{m.nome}}\n </mat-option>\n </mat-select>\n</div>" }]
@@ -414,7 +538,7 @@ class FuncionarioAddDialogComponent {
414
538
  salvar() {
415
539
  if (this.model)
416
540
  return;
417
- const valMsg = valida(this.model, this.focus);
541
+ const valMsg = valida$2(this.model, this.focus);
418
542
  if (valMsg) {
419
543
  this.notification.showMsgError(valMsg);
420
544
  return;
@@ -432,15 +556,15 @@ class FuncionarioAddDialogComponent {
432
556
  });
433
557
  }
434
558
  }
435
- FuncionarioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatDialog }, { token: i0.ElementRef }, { token: i3$1.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
436
- FuncionarioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioAddDialogComponent, selector: "ox-funcionario-add-dialog", ngImport: i0, template: "<div class=\"header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
559
+ FuncionarioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
560
+ FuncionarioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioAddDialogComponent, selector: "ox-funcionario-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
437
561
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, decorators: [{
438
562
  type: Component,
439
- args: [{ selector: 'ox-funcionario-add-dialog', template: "<div class=\"header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"] }]
563
+ args: [{ selector: 'ox-funcionario-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
440
564
  }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
441
565
  type: Inject,
442
566
  args: [MAT_DIALOG_DATA]
443
- }] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }]; } });
567
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
444
568
 
445
569
  class FuncionarioEditDialogComponent {
446
570
  constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
@@ -468,7 +592,7 @@ class FuncionarioEditDialogComponent {
468
592
  salvar() {
469
593
  if (!this.model)
470
594
  return;
471
- const valMsg = valida(this.model, this.focus);
595
+ const valMsg = valida$2(this.model, this.focus);
472
596
  if (valMsg) {
473
597
  this.notification.showMsgError(valMsg);
474
598
  return;
@@ -486,15 +610,15 @@ class FuncionarioEditDialogComponent {
486
610
  });
487
611
  }
488
612
  }
489
- FuncionarioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatDialog }, { token: i0.ElementRef }, { token: i3$1.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
490
- FuncionarioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioEditDialogComponent, selector: "ox-funcionario-edit-dialog", ngImport: i0, template: "<div class=\"header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
613
+ FuncionarioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
614
+ FuncionarioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionarioEditDialogComponent, selector: "ox-funcionario-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }] });
491
615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, decorators: [{
492
616
  type: Component,
493
- args: [{ selector: 'ox-funcionario-edit-dialog', template: "<div class=\"header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;text-transform:uppercase;flex-grow:1;margin:8px 8px 8px 16px;font-size:15px}\n"] }]
617
+ args: [{ selector: 'ox-funcionario-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Funcion\u00E1rio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-funcionario-form [model]=\"model\" *ngIf=\"model\"></ox-funcionario-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
494
618
  }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
495
619
  type: Inject,
496
620
  args: [MAT_DIALOG_DATA]
497
- }] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }]; } });
621
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
498
622
 
499
623
  const fadeAnimation = trigger('fade', [
500
624
  transition(':enter', [
@@ -538,12 +662,12 @@ class AlertDialogComponent {
538
662
  ngOnInit() {
539
663
  }
540
664
  }
541
- AlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, deps: [{ token: i3$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
542
- AlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: AlertDialogComponent, selector: "app-alert-dialog", ngImport: i0, template: "<h1 mat-dialog-title>{{args.titulo}}</h1>\n<div mat-dialog-content>\n <p>{{args.msg}}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">Cancelar</button>\n <button mat-button [mat-dialog-close]=\"true\" cdkFocusInitial>Continuar</button>\n</mat-dialog-actions>", styles: [""], dependencies: [{ kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i3$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
665
+ AlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
666
+ AlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: AlertDialogComponent, selector: "app-alert-dialog", ngImport: i0, template: "<h1 mat-dialog-title>{{args.titulo}}</h1>\n<div mat-dialog-content>\n <p>{{args.msg}}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">Cancelar</button>\n <button mat-button [mat-dialog-close]=\"true\" cdkFocusInitial>Continuar</button>\n</mat-dialog-actions>", styles: [""], dependencies: [{ kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
543
667
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, decorators: [{
544
668
  type: Component,
545
669
  args: [{ selector: 'app-alert-dialog', template: "<h1 mat-dialog-title>{{args.titulo}}</h1>\n<div mat-dialog-content>\n <p>{{args.msg}}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">Cancelar</button>\n <button mat-button [mat-dialog-close]=\"true\" cdkFocusInitial>Continuar</button>\n</mat-dialog-actions>" }]
546
- }], ctorParameters: function () { return [{ type: i3$1.MatDialogRef }, { type: undefined, decorators: [{
670
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: undefined, decorators: [{
547
671
  type: Inject,
548
672
  args: [MAT_DIALOG_DATA]
549
673
  }] }]; } });
@@ -567,7 +691,9 @@ class NavegacaoSelecaoDialogUtil {
567
691
  }
568
692
  if (key !== keyDown && key !== keyUp)
569
693
  return;
570
- let index = this.view.items.indexOf(selected, 0);
694
+ let index = -1;
695
+ if (selected)
696
+ this.view.items.indexOf(selected, 0);
571
697
  if (key === keyDown)
572
698
  index++;
573
699
  if (key === keyUp && index > 0)
@@ -882,7 +1008,7 @@ class ItemCardComponent {
882
1008
  }
883
1009
  }
884
1010
  ItemCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
885
- ItemCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ItemCardComponent, selector: "ox-item-card", inputs: { nome: "nome", codigo: "codigo", star: "star", cloud: "cloud", desativado: "desativado" }, ngImport: i0, template: "<div class=\"nome-codigo-row\"><span class=\"codigo\" *ngIf=\"codigo\">{{codigo}}</span>{{nome}}</div>\n<div class=\"icons-row\">\n <span class=\"material-icons star\" *ngIf=\"star\">\n grade\n </span>\n <span class=\"material-icons desativado\" *ngIf=\"desativado === true\">\n dangerous\n </span>\n <span class=\"material-icons sync-pendente\" *ngIf=\"cloud === false\">\n cloud_queue\n </span>\n <span class=\"material-icons sync-concluido\" *ngIf=\"cloud === true\">\n cloud_done\n </span>\n</div>\n", styles: [":host{display:flex;flex-direction:row;border-bottom:1px solid #e6e9ec;border-left:3px solid #e6e9ec;padding:12px 16px;background:#fff;justify-content:space-between;cursor:pointer;flex-shrink:0;align-items:center;transition:border-left-color 1s;-webkit-user-select:none;user-select:none;font-size:small}:host:hover{box-shadow:0 0 16px #0000000f;background:transparent;z-index:1}:host(.selected){border-left-color:var(--app-color, black);z-index:1;box-shadow:0 0 8px 5px #00000008;flex-shrink:0;background:linear-gradient(45deg,var(--item-card-selected-bg, rgba(0, 0, 0, .05)),transparent)}.nome-codigo-row{display:flex;flex-direction:row;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:8px}.icons-row{display:flex;flex-direction:row;align-items:center;gap:8px}.codigo{color:#666;font-size:x-small;border-radius:4px;padding:0 4px;width:50px;min-width:50px;text-align:center;border:1px solid #eee;margin-right:16px;display:flex;align-items:center;justify-content:center}.sync-pendente{color:#141212;font-size:16px}.sync-concluido{color:#dbdbdb;font-size:16px}.star{color:#000}.desativado{color:#8f07bb;font-size:16px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1011
+ ItemCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ItemCardComponent, selector: "ox-item-card", inputs: { nome: "nome", codigo: "codigo", star: "star", cloud: "cloud", desativado: "desativado" }, ngImport: i0, template: "<div class=\"nome-codigo-row\"><span class=\"codigo\" *ngIf=\"codigo\">{{codigo}}</span>{{nome}}</div>\n<div class=\"icons-row\">\n <span class=\"material-icons star\" *ngIf=\"star\">\n grade\n </span>\n <span class=\"material-icons desativado\" *ngIf=\"desativado === true\">\n dangerous\n </span>\n <span class=\"material-icons sync-pendente\" *ngIf=\"cloud === false\">\n cloud_queue\n </span>\n <span class=\"material-icons sync-concluido\" *ngIf=\"cloud === true\">\n cloud_done\n </span>\n</div>\n", styles: [":host{display:flex;flex-direction:row;border-bottom:1px solid #e6e9ec;border-left:3px solid #e6e9ec;padding:12px 16px;background:#fff;justify-content:space-between;cursor:pointer;flex-shrink:0;align-items:center;transition:border-left-color 1s;-webkit-user-select:none;user-select:none;font-size:small}:host:hover{box-shadow:0 0 16px #0000000f;background:transparent;z-index:1}:host(.selected){border-left-color:var(--app-color, black);z-index:1;box-shadow:0 0 8px 5px #00000008;flex-shrink:0;background:linear-gradient(45deg,var(--item-card-selected-bg, rgba(0, 0, 0, .05)),transparent)}.nome-codigo-row{display:flex;flex-direction:row;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:8px}.icons-row{display:flex;flex-direction:row;align-items:center;gap:8px}.codigo{color:#666;font-size:x-small;border-radius:4px;padding:0 4px;width:50px;min-width:50px;text-align:center;border:1px solid #eee;margin-right:16px;display:flex;align-items:center;justify-content:center}.sync-pendente{color:#141212;font-size:16px}.sync-concluido{color:#dbdbdb;font-size:16px}.star{color:#000}.desativado{color:#8f07bb;font-size:16px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
886
1012
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, decorators: [{
887
1013
  type: Component,
888
1014
  args: [{ selector: 'ox-item-card', template: "<div class=\"nome-codigo-row\"><span class=\"codigo\" *ngIf=\"codigo\">{{codigo}}</span>{{nome}}</div>\n<div class=\"icons-row\">\n <span class=\"material-icons star\" *ngIf=\"star\">\n grade\n </span>\n <span class=\"material-icons desativado\" *ngIf=\"desativado === true\">\n dangerous\n </span>\n <span class=\"material-icons sync-pendente\" *ngIf=\"cloud === false\">\n cloud_queue\n </span>\n <span class=\"material-icons sync-concluido\" *ngIf=\"cloud === true\">\n cloud_done\n </span>\n</div>\n", styles: [":host{display:flex;flex-direction:row;border-bottom:1px solid #e6e9ec;border-left:3px solid #e6e9ec;padding:12px 16px;background:#fff;justify-content:space-between;cursor:pointer;flex-shrink:0;align-items:center;transition:border-left-color 1s;-webkit-user-select:none;user-select:none;font-size:small}:host:hover{box-shadow:0 0 16px #0000000f;background:transparent;z-index:1}:host(.selected){border-left-color:var(--app-color, black);z-index:1;box-shadow:0 0 8px 5px #00000008;flex-shrink:0;background:linear-gradient(45deg,var(--item-card-selected-bg, rgba(0, 0, 0, .05)),transparent)}.nome-codigo-row{display:flex;flex-direction:row;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:8px}.icons-row{display:flex;flex-direction:row;align-items:center;gap:8px}.codigo{color:#666;font-size:x-small;border-radius:4px;padding:0 4px;width:50px;min-width:50px;text-align:center;border:1px solid #eee;margin-right:16px;display:flex;align-items:center;justify-content:center}.sync-pendente{color:#141212;font-size:16px}.sync-concluido{color:#dbdbdb;font-size:16px}.star{color:#000}.desativado{color:#8f07bb;font-size:16px}\n"] }]
@@ -1010,7 +1136,7 @@ class FuncionariosComponent {
1010
1136
  const item = this.selectedItem;
1011
1137
  if (!item)
1012
1138
  return;
1013
- const valMsg = valida(item, this.focus);
1139
+ const valMsg = valida$2(item, this.focus);
1014
1140
  if (valMsg) {
1015
1141
  this.notification.showMsgError(valMsg);
1016
1142
  return;
@@ -1026,12 +1152,12 @@ class FuncionariosComponent {
1026
1152
  });
1027
1153
  }
1028
1154
  }
1029
- FuncionariosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3$1.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1030
- FuncionariosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionariosComponent, selector: "ox-funcionarios", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }, { kind: "pipe", type: i1$2.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
1155
+ FuncionariosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1156
+ FuncionariosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FuncionariosComponent, selector: "ox-funcionarios", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: FuncionarioFormComponent, selector: "ox-funcionario-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
1031
1157
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, decorators: [{
1032
1158
  type: Component,
1033
1159
  args: [{ selector: 'ox-funcionarios', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
1034
- }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3$1.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
1160
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
1035
1161
 
1036
1162
  class CheckButtonComponent {
1037
1163
  constructor() {
@@ -1117,7 +1243,7 @@ class ImageViewerComponent {
1117
1243
  }
1118
1244
  }
1119
1245
  ImageViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1120
- ImageViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ImageViewerComponent, selector: "ox-image-viewer", inputs: { info: "info", infos: "infos", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1246
+ ImageViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ImageViewerComponent, selector: "ox-image-viewer", inputs: { info: "info", infos: "infos", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1121
1247
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, decorators: [{
1122
1248
  type: Component,
1123
1249
  args: [{ selector: 'ox-image-viewer', template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"] }]
@@ -1235,7 +1361,7 @@ class MonthYearPickerComponent {
1235
1361
  }
1236
1362
  }
1237
1363
  MonthYearPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1238
- MonthYearPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MonthYearPickerComponent, selector: "ox-month-year-picker", inputs: { blockFuture: "blockFuture", modoAnual: "modoAnual", ano: "ano", mes: "mes" }, outputs: { anoChange: "anoChange", mesChange: "mesChange", changed: "changed" }, ngImport: i0, template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"], dependencies: [{ kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1364
+ MonthYearPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MonthYearPickerComponent, selector: "ox-month-year-picker", inputs: { blockFuture: "blockFuture", modoAnual: "modoAnual", ano: "ano", mes: "mes" }, outputs: { anoChange: "anoChange", mesChange: "mesChange", changed: "changed" }, ngImport: i0, template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"], dependencies: [{ kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1239
1365
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, decorators: [{
1240
1366
  type: Component,
1241
1367
  args: [{ selector: 'ox-month-year-picker', template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"] }]
@@ -1336,7 +1462,7 @@ class NumericPickerComponent {
1336
1462
  }
1337
1463
  }
1338
1464
  NumericPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1339
- NumericPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NumericPickerComponent, selector: "ox-numeric-picker", inputs: { value: "value", max: "max", min: "min" }, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0, template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"], dependencies: [{ kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1465
+ NumericPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NumericPickerComponent, selector: "ox-numeric-picker", inputs: { value: "value", max: "max", min: "min" }, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0, template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"], dependencies: [{ kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1340
1466
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
1341
1467
  type: Component,
1342
1468
  args: [{ selector: 'ox-numeric-picker', template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"] }]
@@ -1400,7 +1526,7 @@ class PaginatorComponent {
1400
1526
  }
1401
1527
  }
1402
1528
  PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1403
- PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: PaginatorComponent, selector: "ox-paginator", inputs: { pageSize: "pageSize", paginaAtual: "paginaAtual", totalPaginas: "totalPaginas" }, outputs: { paginaAtualChange: "paginaAtualChange", totalPaginasChange: "totalPaginasChange", change: "change" }, ngImport: i0, template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"], dependencies: [{ kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1529
+ PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: PaginatorComponent, selector: "ox-paginator", inputs: { pageSize: "pageSize", paginaAtual: "paginaAtual", totalPaginas: "totalPaginas" }, outputs: { paginaAtualChange: "paginaAtualChange", totalPaginasChange: "totalPaginasChange", change: "change" }, ngImport: i0, template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"], dependencies: [{ kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1404
1530
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
1405
1531
  type: Component,
1406
1532
  args: [{ selector: 'ox-paginator', template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"] }]
@@ -1442,7 +1568,7 @@ class RadioButtonGroupComponent {
1442
1568
  }
1443
1569
  }
1444
1570
  RadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1445
- RadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: { selectedItem: "selectedItem", items: "items" }, outputs: { change: "change" }, ngImport: i0, template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
1571
+ RadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: { selectedItem: "selectedItem", items: "items" }, outputs: { change: "change" }, ngImport: i0, template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
1446
1572
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
1447
1573
  type: Component,
1448
1574
  args: [{ selector: 'ox-radio-button-group', template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"] }]
@@ -1462,127 +1588,128 @@ class SafeHtmlPipe {
1462
1588
  return this.sanitizer.bypassSecurityTrustHtml(html);
1463
1589
  }
1464
1590
  }
1465
- SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1591
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1466
1592
  SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
1467
1593
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, decorators: [{
1468
1594
  type: Pipe,
1469
1595
  args: [{
1470
1596
  name: 'safeHtml'
1471
1597
  }]
1472
- }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
1598
+ }], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
1473
1599
 
1474
- Array.prototype.remove = function (item) {
1475
- const index = this.indexOf(item);
1476
- if (index === -1)
1477
- return false;
1478
- this.splice(index, 1);
1479
- return true;
1480
- };
1481
- Array.prototype.firstOrNull = function () {
1482
- if (this.length > 0)
1483
- return this[0];
1484
- return null;
1485
- };
1486
- Date.prototype.addDays = function (days) {
1487
- var result = new Date(this);
1488
- result.setDate(result.getDate() + days);
1489
- return result;
1490
- };
1491
- class OxpiNglibModule {
1600
+ var ModalidadeBaseICMS;
1601
+ (function (ModalidadeBaseICMS) {
1602
+ ModalidadeBaseICMS[ModalidadeBaseICMS["MargemValorAgregado"] = 0] = "MargemValorAgregado";
1603
+ ModalidadeBaseICMS[ModalidadeBaseICMS["PautaValor"] = 1] = "PautaValor";
1604
+ ModalidadeBaseICMS[ModalidadeBaseICMS["Pre\u00E7oTabeladoMax"] = 2] = "Pre\u00E7oTabeladoMax";
1605
+ ModalidadeBaseICMS[ModalidadeBaseICMS["ValorDaOpera\u00E7\u00E3o"] = 3] = "ValorDaOpera\u00E7\u00E3o";
1606
+ })(ModalidadeBaseICMS || (ModalidadeBaseICMS = {}));
1607
+ function createProduct() {
1608
+ return {
1609
+ id: 0,
1610
+ nome: '',
1611
+ unidade: 'UN',
1612
+ precoCusto: 0,
1613
+ precoVenda: 0,
1614
+ precoFuncionario: 0,
1615
+ estoqueMinimo: 0,
1616
+ referencia: '',
1617
+ aliquotaICMS: null,
1618
+ ncm: null,
1619
+ grupoId: 0,
1620
+ grupoNome: null,
1621
+ subgrupoId: 0,
1622
+ subgrupoNome: null,
1623
+ quantidadeSuite: 0,
1624
+ estoqueControlado: true,
1625
+ imprimiCozinha: true,
1626
+ imprimeCorredor: false,
1627
+ verNaRecepcao: true,
1628
+ prato: false,
1629
+ isAtivo: true,
1630
+ isComposto: true,
1631
+ isIngrediente: true,
1632
+ omiteCliente: false,
1633
+ estoqueRecepcao: false,
1634
+ estoqueRecepcaoQuantidade: 0,
1635
+ gtin: null,
1636
+ cfop: null,
1637
+ csT_icms: null,
1638
+ modBC_icms: 0,
1639
+ pICMS_icms: null,
1640
+ pRedBC_icms: null,
1641
+ pfcP_icms: null,
1642
+ vbcfcP_icms: null,
1643
+ pfcpsT_icms: null,
1644
+ pRedBCEfet_icms: null,
1645
+ vbcEfet_icms: null,
1646
+ picmsEfet_icms: null,
1647
+ vicmsEfet_icms: null,
1648
+ csT_pis: null,
1649
+ vbC_pis: null,
1650
+ ppiS_pis: null,
1651
+ csT_cofins: null,
1652
+ vbC_cofins: null,
1653
+ pcofinS_cofins: null,
1654
+ psT_icms: null,
1655
+ vbcstRet_icms: null,
1656
+ vicmsSubstituto_icms: null,
1657
+ vicmsstRet_icms: null,
1658
+ emiteNFCe: false,
1659
+ cest: null,
1660
+ vbcfcpsT_icms: null,
1661
+ vbcfcpstRet_icms: null,
1662
+ pfcpstRet_icms: null,
1663
+ sitTrib: null,
1664
+ setorSubEstoqueId: null,
1665
+ setorSubEstoqueNome: null,
1666
+ setorPrincipalId: null,
1667
+ setorPrincipalNome: null,
1668
+ qtdMinSubEstoque: null,
1669
+ disponivelCardapio: false,
1670
+ categoriaCardapioId: null,
1671
+ categoriaCardapioNome: null,
1672
+ descricao: null,
1673
+ enviadoPC: false,
1674
+ qbcProd_cofins: null,
1675
+ vAliqProd_cofins: null
1676
+ };
1492
1677
  }
1493
- OxpiNglibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1494
- OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, declarations: [BusyIndicatorComponent,
1495
- MonthYearPickerComponent,
1496
- ImageViewerComponent,
1497
- NumericPickerComponent,
1498
- PaginatorComponent,
1499
- CheckButtonComponent,
1500
- RadioButtonGroupComponent,
1501
- ItemCardComponent,
1502
- SafeHtmlPipe,
1503
- AlertDialogComponent,
1504
- FuncionariosComponent,
1505
- FuncionarioFormComponent,
1506
- FuncionarioEditDialogComponent,
1507
- FuncionarioAddDialogComponent], imports: [BrowserModule,
1508
- BrowserAnimationsModule,
1509
- FormsModule,
1510
- MatButtonModule,
1511
- MatIconModule,
1512
- MatDialogModule,
1513
- MatSelectModule], exports: [BusyIndicatorComponent,
1514
- MonthYearPickerComponent,
1515
- ImageViewerComponent,
1516
- NumericPickerComponent,
1517
- PaginatorComponent,
1518
- CheckButtonComponent,
1519
- RadioButtonGroupComponent,
1520
- ItemCardComponent,
1521
- SafeHtmlPipe] });
1522
- OxpiNglibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, imports: [BrowserModule,
1523
- BrowserAnimationsModule,
1524
- FormsModule,
1525
- MatButtonModule,
1526
- MatIconModule,
1527
- MatDialogModule,
1528
- MatSelectModule] });
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, decorators: [{
1530
- type: NgModule,
1531
- args: [{
1532
- declarations: [
1533
- BusyIndicatorComponent,
1534
- MonthYearPickerComponent,
1535
- ImageViewerComponent,
1536
- NumericPickerComponent,
1537
- PaginatorComponent,
1538
- CheckButtonComponent,
1539
- RadioButtonGroupComponent,
1540
- ItemCardComponent,
1541
- SafeHtmlPipe,
1542
- AlertDialogComponent,
1543
- FuncionariosComponent,
1544
- FuncionarioFormComponent,
1545
- FuncionarioEditDialogComponent,
1546
- FuncionarioAddDialogComponent
1547
- ],
1548
- imports: [
1549
- BrowserModule,
1550
- BrowserAnimationsModule,
1551
- FormsModule,
1552
- MatButtonModule,
1553
- MatIconModule,
1554
- MatDialogModule,
1555
- MatSelectModule,
1556
- ],
1557
- exports: [
1558
- BusyIndicatorComponent,
1559
- MonthYearPickerComponent,
1560
- ImageViewerComponent,
1561
- NumericPickerComponent,
1562
- PaginatorComponent,
1563
- CheckButtonComponent,
1564
- RadioButtonGroupComponent,
1565
- ItemCardComponent,
1566
- SafeHtmlPipe
1567
- ]
1568
- }]
1569
- }] });
1570
-
1571
- class BusyState {
1572
- constructor() {
1573
- this.isBusy = false;
1574
- this.counter = 0;
1678
+ ;
1679
+ function valida$1(item, focus) {
1680
+ if (valTextEmpty(item.nome)) {
1681
+ focus.set('nome');
1682
+ return 'Digite um nome válido.';
1575
1683
  }
1576
- show() {
1577
- this.counter++;
1578
- this.isBusy = true;
1684
+ if (valNumberEmpty(item.grupoId)) {
1685
+ return 'Escolha um grupo de produto.';
1579
1686
  }
1580
- hide() {
1581
- this.counter--;
1582
- if (this.counter < 0)
1583
- this.counter = 0;
1584
- if (this.counter == 0)
1585
- this.isBusy = false;
1687
+ if (valNumberEmpty(item.subgrupoId)) {
1688
+ return 'Escolha um subgrupo de produto.';
1689
+ }
1690
+ if (valTextEmpty(item.unidade)) {
1691
+ focus.set('unidade');
1692
+ return 'Digite uma unidade.';
1693
+ }
1694
+ if (item.disponivelCardapio) {
1695
+ if (valNumberEmpty(item.categoriaCardapioId))
1696
+ return 'Escolha uma categoria do cardápio digital.';
1697
+ if (valTextEmpty(item.descricao)) {
1698
+ focus.set('descricao');
1699
+ return 'Digite uma descrição para o cardápio digital.';
1700
+ }
1701
+ }
1702
+ return null;
1703
+ }
1704
+
1705
+ class ProdutoSearchSetting extends SearchSetting {
1706
+ constructor() {
1707
+ super();
1708
+ this.exibeNaoControladoEstoque = true;
1709
+ this.exibeApenasMostraRecepcao = false;
1710
+ this.exibeInativo = false;
1711
+ this.exibeImprimiCozinha = false;
1712
+ this.exibeHePrato = false;
1586
1713
  }
1587
1714
  }
1588
1715
 
@@ -1651,63 +1778,2025 @@ class NumberParser {
1651
1778
  }
1652
1779
  }
1653
1780
 
1654
- class Ordem {
1655
- constructor(ordens, isCrescente, onToggle) {
1656
- const d = ordens.filter(x => x.default === true).firstOrNull();
1657
- this.colName = d === null ? ordens[0].value : d.value;
1658
- this.isCrescente = isCrescente;
1659
- this.onToggle = onToggle;
1660
- }
1661
- toggle() {
1662
- this.isCrescente = !this.isCrescente;
1663
- if (this.onToggle !== undefined)
1664
- this.onToggle();
1665
- }
1666
- toString() {
1667
- return this.colName + (!this.isCrescente ? " desc" : "");
1781
+ function valida(item, focus) {
1782
+ if (valTextEmpty(item.nome)) {
1783
+ focus.set('nome');
1784
+ return 'Digite um nome válido.';
1668
1785
  }
1786
+ return null;
1669
1787
  }
1670
1788
 
1671
- function printTxt(txt) {
1672
- const r = "<!doctype html><head><meta charset=\"utf-8\"></head><body><div style='font-family: \"Courier New\", Courier, monospace; white-space: pre-wrap;color: black;font-weight: bold;word-wrap: break-word;word-break: break-all;overflow-wrap: break-word;'>" + txt + '</div></body>';
1673
- printHtml(r);
1674
- }
1675
- function printHtml(r) {
1676
- const blob = new Blob([r], { type: 'text/html' });
1677
- const url = window.URL.createObjectURL(blob);
1678
- const w = window.open(url, '_blank');
1679
- if (w != null)
1680
- w.print();
1789
+ class ProdutoGrupoFormComponent {
1790
+ constructor() { }
1791
+ ngOnInit() {
1792
+ }
1681
1793
  }
1682
- function selectText(ev) {
1683
- ev.target.select();
1684
- }
1794
+ ProdutoGrupoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1795
+ ProdutoGrupoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, decorators: [{
1797
+ type: Component,
1798
+ args: [{ selector: 'app-produto-grupo-form', template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"] }]
1799
+ }], ctorParameters: function () { return []; }, propDecorators: { model: [{
1800
+ type: Input
1801
+ }] } });
1685
1802
 
1686
- class PagamentoRecebimentoSearchSetting extends SearchSetting {
1687
- constructor() {
1688
- super();
1689
- this.exibirPagamentos = true;
1690
- this.exibirRecebimentos = true;
1803
+ class ProdutoCategoriaCardapioAddDialogComponent {
1804
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
1805
+ this.ws = ws;
1806
+ this.notification = notification;
1807
+ this.dataDialog = dataDialog;
1808
+ this.dialog = dialog;
1809
+ this.elRef = elRef;
1810
+ this.dialogRef = dialogRef;
1811
+ this.screenHelper = screenHelper;
1812
+ this.isBusy = false;
1813
+ this.focus = new FocusService();
1814
+ this.model = {
1815
+ id: 0,
1816
+ nome: '',
1817
+ isAtivo: true,
1818
+ enviadoPC: false
1819
+ };
1820
+ this.mobile = this.screenHelper.isMedium;
1821
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
1691
1822
  }
1692
- }
1693
-
1694
- class OcupacaoFilterSetting extends SearchSetting {
1695
- constructor() {
1696
- super();
1697
- this.dom = false;
1698
- this.seg = false;
1699
- this.ter = false;
1700
- this.qua = false;
1701
- this.qui = false;
1702
- this.sex = false;
1703
- this.sab = false;
1823
+ ngOnInit() {
1824
+ this.focus.registerElement(this.elRef.nativeElement);
1704
1825
  }
1705
- }
1706
-
1707
- class OcupacaoSearchSetting extends OcupacaoFilterSetting {
1708
- constructor() {
1709
- super();
1710
- this.dateFieldEnum = OcupacaoSearchDateField.DataBaseCaixa;
1826
+ ngOnDestroy() {
1827
+ this.focus.unregisterElement(this.elRef.nativeElement);
1828
+ }
1829
+ salvar() {
1830
+ const valMsg = valida(this.model, this.focus);
1831
+ if (valMsg) {
1832
+ this.notification.showMsgError(valMsg);
1833
+ return;
1834
+ }
1835
+ this.isBusy = true;
1836
+ this.ws.addProdutoCategoriaCardapio(this.model)
1837
+ .subscribe(r => {
1838
+ this.isBusy = false;
1839
+ this.notification.showMsg("Salvo com sucesso.");
1840
+ if (this.dialogRef)
1841
+ this.dialogRef.close(true);
1842
+ }, err => {
1843
+ this.isBusy = false;
1844
+ this.notification.showMsg(err.error);
1845
+ });
1846
+ }
1847
+ }
1848
+ ProdutoCategoriaCardapioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1849
+ ProdutoCategoriaCardapioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioAddDialogComponent, selector: "app-produto-categoria-cardapio-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
1850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, decorators: [{
1851
+ type: Component,
1852
+ args: [{ selector: 'app-produto-categoria-cardapio-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
1853
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
1854
+ type: Inject,
1855
+ args: [MAT_DIALOG_DATA]
1856
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
1857
+
1858
+ class ProdutoCategoriaCardapioEditDialogComponent {
1859
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
1860
+ this.ws = ws;
1861
+ this.notification = notification;
1862
+ this.dataDialog = dataDialog;
1863
+ this.dialog = dialog;
1864
+ this.elRef = elRef;
1865
+ this.dialogRef = dialogRef;
1866
+ this.screenHelper = screenHelper;
1867
+ this.isBusy = false;
1868
+ this.focus = new FocusService();
1869
+ if (dataDialog) {
1870
+ this.model = dataDialog;
1871
+ }
1872
+ this.mobile = this.screenHelper.isMedium;
1873
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
1874
+ }
1875
+ ngOnInit() {
1876
+ this.focus.registerElement(this.elRef.nativeElement);
1877
+ }
1878
+ ngOnDestroy() {
1879
+ this.focus.unregisterElement(this.elRef.nativeElement);
1880
+ }
1881
+ salvar() {
1882
+ if (!this.model)
1883
+ return;
1884
+ const valMsg = valida(this.model, this.focus);
1885
+ if (valMsg) {
1886
+ this.notification.showMsgError(valMsg);
1887
+ return;
1888
+ }
1889
+ this.isBusy = true;
1890
+ this.ws.saveProdutoCategoriaCardapio(this.model)
1891
+ .subscribe(r => {
1892
+ this.isBusy = false;
1893
+ this.notification.showMsg("Salvo com sucesso.");
1894
+ if (this.dialogRef)
1895
+ this.dialogRef.close(true);
1896
+ }, err => {
1897
+ this.isBusy = false;
1898
+ this.notification.showMsg(err.error);
1899
+ });
1900
+ }
1901
+ }
1902
+ ProdutoCategoriaCardapioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1903
+ ProdutoCategoriaCardapioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioEditDialogComponent, selector: "app-produto-categoria-cardapio-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
1904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, decorators: [{
1905
+ type: Component,
1906
+ args: [{ selector: 'app-produto-categoria-cardapio-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
1907
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
1908
+ type: Inject,
1909
+ args: [MAT_DIALOG_DATA]
1910
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
1911
+
1912
+ class ProdutoCategoriaCardapioSelecaoDialogComponent {
1913
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
1914
+ this.dialogRef = dialogRef;
1915
+ this.dialog = dialog;
1916
+ this.ws = ws;
1917
+ this.notification = notification;
1918
+ this.screenHelper = screenHelper;
1919
+ this.items = [];
1920
+ this.selectedItem = null;
1921
+ this.isBusy = false;
1922
+ this.setting = new SearchSetting();
1923
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
1924
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
1925
+ this.mobile = this.screenHelper.isMedium;
1926
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
1927
+ this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
1928
+ }
1929
+ ngOnInit() {
1930
+ this.setting.ordem = "nome";
1931
+ this.atualiza();
1932
+ }
1933
+ atualiza() {
1934
+ this.isBusy = true;
1935
+ this.ws.buscaProdutoCategoriaCardapio(this.setting)
1936
+ .subscribe(r => {
1937
+ this.isBusy = false;
1938
+ this.items = r;
1939
+ console.info(r);
1940
+ }, err => {
1941
+ this.isBusy = false;
1942
+ this.notification.showHttpError(err);
1943
+ });
1944
+ }
1945
+ selectItem(i) {
1946
+ if (this.selectedItem === i) {
1947
+ this.dialogRef.close(i);
1948
+ }
1949
+ this.selectedItem = i;
1950
+ }
1951
+ novo() {
1952
+ let height = (window.innerHeight * 0.90) + 'px';
1953
+ let width = 550 + 'px';
1954
+ if (this.mobile) {
1955
+ width = (window.innerWidth * 0.99) + 'px';
1956
+ //height = (window.innerHeight * 0.98) + 'px';
1957
+ }
1958
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
1959
+ width: width,
1960
+ height: height,
1961
+ maxWidth: '100%',
1962
+ panelClass: 'dialog-p0',
1963
+ });
1964
+ dialog.afterClosed().subscribe(result => {
1965
+ if (result === undefined)
1966
+ return;
1967
+ this.notification.showMsg("Salvo com sucesso.");
1968
+ this.atualiza();
1969
+ });
1970
+ }
1971
+ editar() {
1972
+ let height = (window.innerHeight * 0.90) + 'px';
1973
+ let width = 550 + 'px';
1974
+ if (this.mobile) {
1975
+ width = (window.innerWidth * 0.99) + 'px';
1976
+ //height = (window.innerHeight * 0.98) + 'px';
1977
+ }
1978
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
1979
+ width: width,
1980
+ height: height,
1981
+ maxWidth: '100%',
1982
+ panelClass: 'dialog-p0',
1983
+ data: this.selectedItem
1984
+ });
1985
+ dialog.afterClosed().subscribe(result => {
1986
+ if (result === undefined)
1987
+ return;
1988
+ this.notification.showMsg("Salvo com sucesso.");
1989
+ this.atualiza();
1990
+ });
1991
+ }
1992
+ }
1993
+ ProdutoCategoriaCardapioSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
1994
+ ProdutoCategoriaCardapioSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioSelecaoDialogComponent, selector: "app-produto-categoria-cardapio-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n<!--\n <div (click)=\"selectItem(i)\" [ngClass]=\"{selected: selectedItem === i}\" class=\"list-item\" *ngFor=\"let i of items\">\n <span>{{i.nome}}</span>\n </div>\n-->\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
1995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, decorators: [{
1996
+ type: Component,
1997
+ args: [{ selector: 'app-produto-categoria-cardapio-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n<!--\n <div (click)=\"selectItem(i)\" [ngClass]=\"{selected: selectedItem === i}\" class=\"list-item\" *ngFor=\"let i of items\">\n <span>{{i.nome}}</span>\n </div>\n-->\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
1998
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
1999
+
2000
+ class ProdutoGrupoAddDialogComponent {
2001
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2002
+ this.ws = ws;
2003
+ this.notification = notification;
2004
+ this.dataDialog = dataDialog;
2005
+ this.dialog = dialog;
2006
+ this.elRef = elRef;
2007
+ this.dialogRef = dialogRef;
2008
+ this.screenHelper = screenHelper;
2009
+ this.isBusy = false;
2010
+ this.focus = new FocusService();
2011
+ this.model = {
2012
+ id: 0,
2013
+ nome: '',
2014
+ isAtivo: true,
2015
+ enviadoPC: false
2016
+ };
2017
+ this.mobile = this.screenHelper.isMedium;
2018
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2019
+ }
2020
+ ngOnInit() {
2021
+ this.focus.registerElement(this.elRef.nativeElement);
2022
+ }
2023
+ ngOnDestroy() {
2024
+ this.focus.unregisterElement(this.elRef.nativeElement);
2025
+ }
2026
+ salvar() {
2027
+ const valMsg = valida(this.model, this.focus);
2028
+ if (valMsg) {
2029
+ this.notification.showMsgError(valMsg);
2030
+ return;
2031
+ }
2032
+ this.isBusy = true;
2033
+ this.ws.addProdutoGrupo(this.model)
2034
+ .subscribe(r => {
2035
+ this.isBusy = false;
2036
+ this.notification.showMsg("Salvo com sucesso.");
2037
+ if (this.dialogRef)
2038
+ this.dialogRef.close(true);
2039
+ }, err => {
2040
+ this.isBusy = false;
2041
+ this.notification.showMsg(err.error);
2042
+ });
2043
+ }
2044
+ }
2045
+ ProdutoGrupoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2046
+ ProdutoGrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoAddDialogComponent, selector: "app-produto-grupo-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, decorators: [{
2048
+ type: Component,
2049
+ args: [{ selector: 'app-produto-grupo-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2050
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2051
+ type: Inject,
2052
+ args: [MAT_DIALOG_DATA]
2053
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2054
+
2055
+ class ProdutoGrupoEditDialogComponent {
2056
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2057
+ this.ws = ws;
2058
+ this.notification = notification;
2059
+ this.dataDialog = dataDialog;
2060
+ this.dialog = dialog;
2061
+ this.elRef = elRef;
2062
+ this.dialogRef = dialogRef;
2063
+ this.screenHelper = screenHelper;
2064
+ this.isBusy = false;
2065
+ this.focus = new FocusService();
2066
+ if (dataDialog) {
2067
+ this.model = dataDialog;
2068
+ }
2069
+ this.mobile = this.screenHelper.isMedium;
2070
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2071
+ }
2072
+ ngOnInit() {
2073
+ this.focus.registerElement(this.elRef.nativeElement);
2074
+ }
2075
+ ngOnDestroy() {
2076
+ this.focus.unregisterElement(this.elRef.nativeElement);
2077
+ }
2078
+ salvar() {
2079
+ if (!this.model)
2080
+ return;
2081
+ const valMsg = valida(this.model, this.focus);
2082
+ if (valMsg) {
2083
+ this.notification.showMsgError(valMsg);
2084
+ return;
2085
+ }
2086
+ this.isBusy = true;
2087
+ this.ws.saveProdutoGrupo(this.model)
2088
+ .subscribe(r => {
2089
+ this.isBusy = false;
2090
+ this.notification.showMsg("Salvo com sucesso.");
2091
+ if (this.dialogRef)
2092
+ this.dialogRef.close(true);
2093
+ }, err => {
2094
+ this.isBusy = false;
2095
+ this.notification.showMsg(err.error);
2096
+ });
2097
+ }
2098
+ }
2099
+ ProdutoGrupoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2100
+ ProdutoGrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoEditDialogComponent, selector: "app-produto-grupo-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, decorators: [{
2102
+ type: Component,
2103
+ args: [{ selector: 'app-produto-grupo-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2104
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2105
+ type: Inject,
2106
+ args: [MAT_DIALOG_DATA]
2107
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2108
+
2109
+ class ProdutoGrupoSelecaoDialogComponent {
2110
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
2111
+ this.dialogRef = dialogRef;
2112
+ this.dialog = dialog;
2113
+ this.ws = ws;
2114
+ this.notification = notification;
2115
+ this.screenHelper = screenHelper;
2116
+ this.items = [];
2117
+ this.selectedItem = null;
2118
+ this.isBusy = false;
2119
+ this.setting = new SearchSetting();
2120
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2121
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2122
+ this.mobile = this.screenHelper.isMedium;
2123
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
2124
+ this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
2125
+ }
2126
+ ngOnInit() {
2127
+ this.setting.ordem = "nome";
2128
+ this.atualiza();
2129
+ }
2130
+ atualiza() {
2131
+ this.isBusy = true;
2132
+ this.ws.buscaProdutoGrupo(this.setting)
2133
+ .subscribe(r => {
2134
+ this.isBusy = false;
2135
+ this.items = r;
2136
+ console.info(r);
2137
+ }, err => {
2138
+ this.isBusy = false;
2139
+ this.notification.showHttpError(err);
2140
+ });
2141
+ }
2142
+ selectItem(i) {
2143
+ if (this.selectedItem === i) {
2144
+ this.dialogRef.close(i);
2145
+ }
2146
+ this.selectedItem = i;
2147
+ }
2148
+ novo() {
2149
+ let height = (window.innerHeight * 0.90) + 'px';
2150
+ let width = 550 + 'px';
2151
+ if (this.mobile) {
2152
+ width = (window.innerWidth * 0.99) + 'px';
2153
+ //height = (window.innerHeight * 0.98) + 'px';
2154
+ }
2155
+ const dialog = this.dialog.open(ProdutoGrupoAddDialogComponent, {
2156
+ width: width,
2157
+ height: height,
2158
+ maxWidth: '100%',
2159
+ panelClass: 'dialog-p0',
2160
+ });
2161
+ dialog.afterClosed().subscribe(result => {
2162
+ if (result === undefined)
2163
+ return;
2164
+ this.notification.showMsg("Salvo com sucesso.");
2165
+ this.atualiza();
2166
+ });
2167
+ }
2168
+ editar() {
2169
+ let height = (window.innerHeight * 0.90) + 'px';
2170
+ let width = 550 + 'px';
2171
+ if (this.mobile) {
2172
+ width = (window.innerWidth * 0.99) + 'px';
2173
+ //height = (window.innerHeight * 0.98) + 'px';
2174
+ }
2175
+ const dialog = this.dialog.open(ProdutoGrupoEditDialogComponent, {
2176
+ width: width,
2177
+ height: height,
2178
+ maxWidth: '100%',
2179
+ panelClass: 'dialog-p0',
2180
+ data: this.selectedItem
2181
+ });
2182
+ dialog.afterClosed().subscribe(result => {
2183
+ if (result === undefined)
2184
+ return;
2185
+ this.notification.showMsg("Salvo com sucesso.");
2186
+ this.atualiza();
2187
+ });
2188
+ }
2189
+ }
2190
+ ProdutoGrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2191
+ ProdutoGrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoSelecaoDialogComponent, selector: "app-produto-grupo-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
2192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, decorators: [{
2193
+ type: Component,
2194
+ args: [{ selector: 'app-produto-grupo-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2195
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2196
+
2197
+ class ProdutosNcmDialogComponent {
2198
+ constructor(dialogRef, dialog, ws, notification, screenHelper) {
2199
+ this.dialogRef = dialogRef;
2200
+ this.dialog = dialog;
2201
+ this.ws = ws;
2202
+ this.notification = notification;
2203
+ this.screenHelper = screenHelper;
2204
+ this.isBusy = false;
2205
+ this.frase = '';
2206
+ this.items = [];
2207
+ this.selectedItem = null;
2208
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2209
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2210
+ this.mobile = this.screenHelper.isMedium;
2211
+ }
2212
+ ngOnInit() {
2213
+ this.atualiza();
2214
+ }
2215
+ atualiza() {
2216
+ this.isBusy = true;
2217
+ this.ws.buscaNcm(this.frase)
2218
+ .subscribe(r => {
2219
+ this.isBusy = false;
2220
+ this.items = r;
2221
+ console.info(r);
2222
+ }, err => {
2223
+ this.isBusy = false;
2224
+ this.notification.showHttpError(err);
2225
+ });
2226
+ }
2227
+ selectItem(i) {
2228
+ if (this.selectedItem === i) {
2229
+ this.dialogRef.close(i);
2230
+ }
2231
+ this.selectedItem = i;
2232
+ }
2233
+ }
2234
+ ProdutosNcmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2235
+ ProdutosNcmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosNcmDialogComponent, selector: "app-produtos-ncm-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.codigo\" [nome]=\"i.descricao\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
2236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, decorators: [{
2237
+ type: Component,
2238
+ args: [{ selector: 'app-produtos-ncm-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.codigo\" [nome]=\"i.descricao\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2239
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: ScreenHelperService }]; } });
2240
+
2241
+ class ProdutoSubgrupoAddDialogComponent {
2242
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2243
+ this.ws = ws;
2244
+ this.notification = notification;
2245
+ this.dataDialog = dataDialog;
2246
+ this.dialog = dialog;
2247
+ this.elRef = elRef;
2248
+ this.dialogRef = dialogRef;
2249
+ this.screenHelper = screenHelper;
2250
+ this.isBusy = false;
2251
+ this.focus = new FocusService();
2252
+ this.model = {
2253
+ id: 0,
2254
+ nome: '',
2255
+ isAtivo: true,
2256
+ enviadoPC: false
2257
+ };
2258
+ this.mobile = this.screenHelper.isMedium;
2259
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2260
+ }
2261
+ ngOnInit() {
2262
+ this.focus.registerElement(this.elRef.nativeElement);
2263
+ }
2264
+ ngOnDestroy() {
2265
+ this.focus.unregisterElement(this.elRef.nativeElement);
2266
+ }
2267
+ salvar() {
2268
+ if (!this.model)
2269
+ return;
2270
+ const valMsg = valida(this.model, this.focus);
2271
+ if (valMsg) {
2272
+ this.notification.showMsgError(valMsg);
2273
+ return;
2274
+ }
2275
+ this.isBusy = true;
2276
+ this.ws.addProdutoSubgrupo(this.model)
2277
+ .subscribe(r => {
2278
+ this.isBusy = false;
2279
+ this.notification.showMsg("Salvo com sucesso.");
2280
+ if (this.dialogRef)
2281
+ this.dialogRef.close(true);
2282
+ }, err => {
2283
+ this.isBusy = false;
2284
+ this.notification.showMsg(err.error);
2285
+ });
2286
+ }
2287
+ }
2288
+ ProdutoSubgrupoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2289
+ ProdutoSubgrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoAddDialogComponent, selector: "app-produto-subgrupo-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, decorators: [{
2291
+ type: Component,
2292
+ args: [{ selector: 'app-produto-subgrupo-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2293
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2294
+ type: Inject,
2295
+ args: [MAT_DIALOG_DATA]
2296
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2297
+
2298
+ class ProdutoSubgrupoEditDialogComponent {
2299
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2300
+ this.ws = ws;
2301
+ this.notification = notification;
2302
+ this.dataDialog = dataDialog;
2303
+ this.dialog = dialog;
2304
+ this.elRef = elRef;
2305
+ this.dialogRef = dialogRef;
2306
+ this.screenHelper = screenHelper;
2307
+ this.isBusy = false;
2308
+ this.focus = new FocusService();
2309
+ if (dataDialog) {
2310
+ this.model = dataDialog;
2311
+ }
2312
+ this.mobile = this.screenHelper.isMedium;
2313
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2314
+ }
2315
+ ngOnInit() {
2316
+ this.focus.registerElement(this.elRef.nativeElement);
2317
+ }
2318
+ ngOnDestroy() {
2319
+ this.focus.unregisterElement(this.elRef.nativeElement);
2320
+ }
2321
+ salvar() {
2322
+ if (!this.model)
2323
+ return;
2324
+ const valMsg = valida(this.model, this.focus);
2325
+ if (valMsg) {
2326
+ this.notification.showMsgError(valMsg);
2327
+ return;
2328
+ }
2329
+ this.isBusy = true;
2330
+ this.ws.saveProdutoSubgrupo(this.model)
2331
+ .subscribe(r => {
2332
+ this.isBusy = false;
2333
+ this.notification.showMsg("Salvo com sucesso.");
2334
+ if (this.dialogRef)
2335
+ this.dialogRef.close(true);
2336
+ }, err => {
2337
+ this.isBusy = false;
2338
+ this.notification.showMsg(err.error);
2339
+ });
2340
+ }
2341
+ }
2342
+ ProdutoSubgrupoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2343
+ ProdutoSubgrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoEditDialogComponent, selector: "app-produto-subgrupo-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
2344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, decorators: [{
2345
+ type: Component,
2346
+ args: [{ selector: 'app-produto-subgrupo-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2347
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2348
+ type: Inject,
2349
+ args: [MAT_DIALOG_DATA]
2350
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2351
+
2352
+ class ProdutoSubgrupoSelecaoDialogComponent {
2353
+ constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
2354
+ this.dialogRef = dialogRef;
2355
+ this.dialog = dialog;
2356
+ this.ws = ws;
2357
+ this.notification = notification;
2358
+ this.screenHelper = screenHelper;
2359
+ this.items = [];
2360
+ this.selectedItem = null;
2361
+ this.isBusy = false;
2362
+ this.setting = new SearchSetting();
2363
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2364
+ this.nav = new NavegacaoSelecaoDialogUtil(this);
2365
+ this.mobile = this.screenHelper.isMedium;
2366
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
2367
+ this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
2368
+ }
2369
+ ngOnInit() {
2370
+ this.setting.ordem = "nome";
2371
+ this.atualiza();
2372
+ }
2373
+ atualiza() {
2374
+ this.isBusy = true;
2375
+ this.ws.buscaProdutoSubgrupo(this.setting)
2376
+ .subscribe(r => {
2377
+ this.isBusy = false;
2378
+ this.items = r;
2379
+ console.info(r);
2380
+ }, err => {
2381
+ this.isBusy = false;
2382
+ this.notification.showHttpError(err);
2383
+ });
2384
+ }
2385
+ selectItem(i) {
2386
+ if (this.selectedItem === i) {
2387
+ this.dialogRef.close(i);
2388
+ }
2389
+ this.selectedItem = i;
2390
+ }
2391
+ novo() {
2392
+ let height = (window.innerHeight * 0.90) + 'px';
2393
+ let width = 550 + 'px';
2394
+ if (this.mobile) {
2395
+ width = (window.innerWidth * 0.99) + 'px';
2396
+ //height = (window.innerHeight * 0.98) + 'px';
2397
+ }
2398
+ const dialog = this.dialog.open(ProdutoSubgrupoAddDialogComponent, {
2399
+ width: width,
2400
+ height: height,
2401
+ maxWidth: '100%',
2402
+ panelClass: 'dialog-p0',
2403
+ });
2404
+ dialog.afterClosed().subscribe(result => {
2405
+ if (result === undefined)
2406
+ return;
2407
+ this.notification.showMsg("Salvo com sucesso.");
2408
+ this.atualiza();
2409
+ });
2410
+ }
2411
+ editar() {
2412
+ let height = (window.innerHeight * 0.90) + 'px';
2413
+ let width = 550 + 'px';
2414
+ if (this.mobile) {
2415
+ width = (window.innerWidth * 0.99) + 'px';
2416
+ //height = (window.innerHeight * 0.98) + 'px';
2417
+ }
2418
+ const dialog = this.dialog.open(ProdutoSubgrupoEditDialogComponent, {
2419
+ width: width,
2420
+ height: height,
2421
+ maxWidth: '100%',
2422
+ panelClass: 'dialog-p0',
2423
+ data: this.selectedItem
2424
+ });
2425
+ dialog.afterClosed().subscribe(result => {
2426
+ if (result === undefined)
2427
+ return;
2428
+ this.notification.showMsg("Salvo com sucesso.");
2429
+ this.atualiza();
2430
+ });
2431
+ }
2432
+ }
2433
+ ProdutoSubgrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2434
+ ProdutoSubgrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoSelecaoDialogComponent, selector: "app-produto-subgrupo-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Subgrupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
2435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, decorators: [{
2436
+ type: Component,
2437
+ args: [{ selector: 'app-produto-subgrupo-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Subgrupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2438
+ }], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
2439
+
2440
+ const lateralAnimation = trigger('menuLateral', [
2441
+ transition(':enter', [
2442
+ style({ opacity: 0 }),
2443
+ animate('600ms', style({ 'opacity': 1 }))
2444
+ ])
2445
+ ]);
2446
+ class ProdutoFormComponent {
2447
+ constructor(dialog, ws, http, auth, notification, screenHelper) {
2448
+ this.dialog = dialog;
2449
+ this.ws = ws;
2450
+ this.http = http;
2451
+ this.auth = auth;
2452
+ this.notification = notification;
2453
+ this.screenHelper = screenHelper;
2454
+ this.cfopList = [
2455
+ { item1: '5101', item2: 'Venda de produção do estabelecimento' },
2456
+ { item1: '5102', item2: 'Venda de mercadoria adquirida ou recebida de terceiros' },
2457
+ { item1: '5405', item2: 'Venda de mercadoria, adquirida ou recebida de terceiros, sujeita ao regime de substituição tributária, na condição de contribuinte-substituído' },
2458
+ { item1: '5933', item2: 'Serviço' },
2459
+ ];
2460
+ this.stList = [
2461
+ { item1: 'F', item2: 'Subs. Trib.' },
2462
+ { item1: 'I', item2: 'Isento' },
2463
+ { item1: 'N', item2: 'Não Tributado' },
2464
+ { item1: 'Q', item2: 'Isento ISSQN' },
2465
+ { item1: 'S', item2: 'Tributado ISSQN' },
2466
+ { item1: 'T', item2: 'Tributado ICMS' },
2467
+ ];
2468
+ this.modBaseICMS = [
2469
+ { item1: 0, item2: 'Margem Valor Agregado (%)' },
2470
+ { item1: 1, item2: 'Pauta (Valor)' },
2471
+ { item1: 2, item2: 'Preço Tabelado Máx. (valor)' },
2472
+ { item1: 3, item2: 'Valor da operação' },
2473
+ ];
2474
+ this.cstICMSList = [
2475
+ { item1: '00', item2: 'Tributada integralmente' },
2476
+ { item1: '10', item2: 'Tributada e com cobrança do ICMS por substituição tributária' },
2477
+ { item1: '20', item2: 'Com redução de base de cálculo' },
2478
+ { item1: '30', item2: 'Isenta ou não tributada e com cobrança do ICMS por substituição tributária' },
2479
+ { item1: '40', item2: 'Isenta' },
2480
+ { item1: '41', item2: 'Não tributada' },
2481
+ { item1: '50', item2: 'Suspensão' },
2482
+ { item1: '51', item2: 'Diferimento' },
2483
+ { item1: '60', item2: 'ICMS cobrado anteriormente por substituição tributária' },
2484
+ { item1: '70', item2: 'Com redução de base de cálculo e cobrança do ICMS por substituição tributária' },
2485
+ { item1: '90', item2: 'Outros' },
2486
+ { item1: '101', item2: 'Tributada pelo Simples Nacional com permissão de crédito' },
2487
+ { item1: '102', item2: 'Tributada pelo Simples Nacional sem permissão de crédito' },
2488
+ { item1: '103', item2: 'Isenção do ICMS no Simples Nacional para faixa de receita bruta' },
2489
+ { item1: '300', item2: 'Imune' },
2490
+ { item1: '400', item2: 'Não tributada pelo Simples Nacional' },
2491
+ { item1: '201', item2: 'Tributada pelo Simples Nacional com permissão de crédito e com cobrança do ICMS por Substituição Tributária' },
2492
+ { item1: '202', item2: 'Tributada pelo Simples Nacional sem permissão de crédito e com cobrança do ICMS por Substituição Tributária' },
2493
+ { item1: '203', item2: 'Isenção do ICMS nos Simples Nacional para faixa de receita bruta e com cobrança do ICMS por Substituição Tributária' },
2494
+ { item1: '500', item2: 'ICMS cobrado anteriormente por substituição tributária (substituído) ou por antecipação' },
2495
+ { item1: '900', item2: 'Outros' }
2496
+ ];
2497
+ this.cstCofinsList = [
2498
+ { item1: '01', item2: ' Operação Tributável (base de cálculo = valor da operação alíquota normal (cumulativo/não cumulativo));' },
2499
+ { item1: '02', item2: ' Operação Tributável (base de cálculo = valor da operação (alíquota diferenciada));' },
2500
+ { item1: '03', item2: ' Operação Tributável (base de cálculo = quantidade vendida x alíquota por unidade de produto);' },
2501
+ { item1: '04', item2: ' Operação Tributável (tributação monofásica (alíquota zero));' },
2502
+ { item1: '05', item2: ' Operação Tributável (Substituição Tributária);' },
2503
+ { item1: '06', item2: ' Operação Tributável (alíquota zero);' },
2504
+ { item1: '07', item2: ' Operação Isenta da Contribuição;' },
2505
+ { item1: '08', item2: ' Operação Sem Incidência da Contribuição;' },
2506
+ { item1: '09', item2: ' Operação com Suspensão da Contribuição;' },
2507
+ { item1: '99', item2: ' Outras Operações;' },
2508
+ { item1: '49', item2: ' Outras Operações de Saída; ' },
2509
+ { item1: '50', item2: ' Operação com Direito a Crédito Vinculada Exclusivamente a Receita Tributada no Mercado Interno; ' },
2510
+ { item1: '51', item2: ' Operação com Direito a Crédito Vinculada Exclusivamente a Receita Não Tributada no Mercado Interno ;' },
2511
+ { item1: '52', item2: ' Operação com Direito a Crédito Vinculada Exclusivamente a Receita de Exportação; ' },
2512
+ { item1: '53', item2: ' Operação com Direito a Crédito Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno; ' },
2513
+ { item1: '54', item2: ' Operação com Direito a Crédito Vinculada a Receitas Tributadas no Mercado Interno e de Exportação ;' },
2514
+ { item1: '55', item2: ' Operação com Direito a Crédito Vinculada a Receitas NãoTributadas no Mercado Interno e de Exportação; ' },
2515
+ { item1: '56', item2: ' Operação com Direito a Crédito Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno, e de Exportação;' },
2516
+ { item1: '60', item2: ' Crédito Presumido Operação de Aquisição Vinculada Exclusivamente a Receita Tributada no Mercado Interno; ' },
2517
+ { item1: '61', item2: ' Crédito Presumido Operação de Aquisição Vinculada Exclusivamente a Receita Não Tributada no Mercado Interno; ' },
2518
+ { item1: '62', item2: ' Crédito Presumido Operação de Aquisição Vinculada Exclusivamente a Receita de Exportação; ' },
2519
+ { item1: '63', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno; ' },
2520
+ { item1: '64', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas Tributadas no Mercado Interno e de Exportação; ' },
2521
+ { item1: '65', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas NãoTributadas no Mercado Interno e de Exportação; ' },
2522
+ { item1: '66', item2: ' Crédito Presumido Operação de Aquisição Vinculada a Receitas Tributadas e NãoTributadas no Mercado Interno, e de Exportação; ' },
2523
+ { item1: '67', item2: ' Crédito Presumido Outras Operações; ' },
2524
+ { item1: '70', item2: ' Operação de Aquisição sem Direito a Crédito; ' },
2525
+ { item1: '71', item2: ' Operação de Aquisição com Isenção; ' },
2526
+ { item1: '72', item2: ' Operação de Aquisição com Suspensão; ' },
2527
+ { item1: '73', item2: ' Operação de Aquisição a Alíquota Zero; ' },
2528
+ { item1: '74', item2: ' Operação de Aquisição sem Incidência da Contribuição; ' },
2529
+ { item1: '75', item2: ' Operação de Aquisição por Substituição Tributária;' },
2530
+ { item1: '98', item2: ' Outras Operações de Entrada;' },
2531
+ ];
2532
+ this.ncmEncontrado = false;
2533
+ this.ncmNaoEncontrado = false;
2534
+ this.isBusy = false;
2535
+ this.pRedBCEfet_icmsParser = new NumberParser(v => this.model.pRedBCEfet_icms = v, () => this.model.pRedBCEfet_icms);
2536
+ this.picmsEfet_icmsParser = new NumberParser(v => this.model.picmsEfet_icms = v, () => this.model.picmsEfet_icms);
2537
+ this.vbcEfet_icmsParser = new NumberParser(v => this.model.vbcEfet_icms = v, () => this.model.vbcEfet_icms);
2538
+ this.vicmsEfet_icmsParser = new NumberParser(v => this.model.vicmsEfet_icms = v, () => this.model.vicmsEfet_icms);
2539
+ this.psT_icmsParser = new NumberParser(v => this.model.psT_icms = v, () => this.model.psT_icms);
2540
+ this.vbcstRet_icmsParser = new NumberParser(v => this.model.vbcstRet_icms = v, () => this.model.vbcstRet_icms);
2541
+ this.vicmsSubstituto_icmsParser = new NumberParser(v => this.model.vicmsSubstituto_icms = v, () => this.model.vicmsSubstituto_icms);
2542
+ this.vicmsstRet_icmsParser = new NumberParser(v => this.model.vicmsstRet_icms = v, () => this.model.vicmsstRet_icms);
2543
+ this.pfcP_icmsParser = new NumberParser(v => this.model.pfcP_icms = v, () => this.model.pfcP_icms);
2544
+ this.vbcfcP_icmsParser = new NumberParser(v => this.model.vbcfcP_icms = v, () => this.model.vbcfcP_icms);
2545
+ this.pfcpsT_icmsParser = new NumberParser(v => this.model.pfcpsT_icms = v, () => this.model.pfcpsT_icms);
2546
+ this.vbcfcpsT_icmsParser = new NumberParser(v => this.model.vbcfcpsT_icms = v, () => this.model.vbcfcpsT_icms);
2547
+ this.pfcpstRet_icmsParser = new NumberParser(v => this.model.pfcpstRet_icms = v, () => this.model.pfcpstRet_icms);
2548
+ this.vbcfcpstRet_icmsParser = new NumberParser(v => this.model.vbcfcpstRet_icms = v, () => this.model.vbcfcpstRet_icms);
2549
+ this.ppiS_pisParser = new NumberParser(v => this.model.ppiS_pis = v, () => this.model.ppiS_pis);
2550
+ this.vbC_pisParser = new NumberParser(v => this.model.vbC_pis = v, () => this.model.vbC_pis);
2551
+ this.pcofinS_cofinsParser = new NumberParser(v => this.model.pcofinS_cofins = v, () => this.model.pcofinS_cofins);
2552
+ this.vbC_cofinsParser = new NumberParser(v => this.model.vbC_cofins = v, () => this.model.vbC_cofins);
2553
+ this.precoVendaParser = new NumberParser((v) => this.model.precoVenda = v ?? 0, () => this.model.precoVenda);
2554
+ this.precoCustoParser = new NumberParser((v) => this.model.precoCusto = v ?? 0, () => this.model.precoCusto);
2555
+ this.precoFuncParser = new NumberParser((v) => this.model.precoFuncionario = v ?? 0, () => this.model.precoFuncionario);
2556
+ this.pICMS_icmsParser = new NumberParser((v) => this.model.pICMS_icms = v, () => this.model.pICMS_icms);
2557
+ this.lazyTriggerNcm = new LazyTrigger(() => { this.findNCM(); });
2558
+ this.editMode = false;
2559
+ this.nextIdClick = new EventEmitter();
2560
+ this.progress = 0;
2561
+ this.message = '';
2562
+ this._model = createProduct();
2563
+ this.tabs = [
2564
+ { name: "Campos Gerais", value: 0 },
2565
+ { name: "Campos Fiscais", value: 1 },
2566
+ { name: "Cardápio Digital", value: 2 }
2567
+ ];
2568
+ this.selectedTab = 0;
2569
+ this.setores = [];
2570
+ }
2571
+ get model() {
2572
+ return this._model;
2573
+ }
2574
+ set model(value) {
2575
+ this._model = value;
2576
+ this.setImgUrl();
2577
+ this.findNCM();
2578
+ }
2579
+ ngOnInit() {
2580
+ this.loadSetores();
2581
+ }
2582
+ loadSetores() {
2583
+ this.isBusy = true;
2584
+ this.ws.getAllSetores()
2585
+ .subscribe(r => {
2586
+ this.setores = r;
2587
+ console.info(r);
2588
+ this.isBusy = false;
2589
+ }, err => {
2590
+ this.isBusy = false;
2591
+ this.notification.showHttpError(err);
2592
+ });
2593
+ }
2594
+ editarNCM() {
2595
+ let height = (window.innerHeight * 0.95) + 'px';
2596
+ let width = 550 + 'px';
2597
+ if (this.screenHelper.mobileScreen) {
2598
+ width = (window.innerWidth * 0.99) + 'px';
2599
+ height = (window.innerHeight * 0.99) + 'px';
2600
+ }
2601
+ let dialogRef = this.dialog.open(ProdutosNcmDialogComponent, {
2602
+ height: height,
2603
+ width: width,
2604
+ maxWidth: '100%',
2605
+ panelClass: 'dialog-p0',
2606
+ });
2607
+ dialogRef.afterClosed().subscribe(result => {
2608
+ if (result == undefined)
2609
+ return;
2610
+ if (!this.model)
2611
+ return;
2612
+ this.model.ncm = result.codigoApenasDigitos;
2613
+ this.lazyTriggerNcm.fire();
2614
+ });
2615
+ }
2616
+ editarSubgrupo() {
2617
+ let height = (window.innerHeight * 0.95) + 'px';
2618
+ let width = 550 + 'px';
2619
+ if (this.screenHelper.mobileScreen) {
2620
+ width = (window.innerWidth * 0.99) + 'px';
2621
+ height = (window.innerHeight * 0.99) + 'px';
2622
+ }
2623
+ let dialogRef = this.dialog.open(ProdutoSubgrupoSelecaoDialogComponent, {
2624
+ height: height,
2625
+ width: width,
2626
+ maxWidth: '100%',
2627
+ panelClass: 'dialog-p0',
2628
+ });
2629
+ dialogRef.afterClosed().subscribe(result => {
2630
+ if (result == undefined)
2631
+ return;
2632
+ if (!this.model)
2633
+ return;
2634
+ this.model.subgrupoId = result.id;
2635
+ this.model.subgrupoNome = result.nome;
2636
+ });
2637
+ }
2638
+ editarGrupo() {
2639
+ let height = (window.innerHeight * 0.95) + 'px';
2640
+ let width = 550 + 'px';
2641
+ if (this.screenHelper.mobileScreen) {
2642
+ width = (window.innerWidth * 0.99) + 'px';
2643
+ height = (window.innerHeight * 0.99) + 'px';
2644
+ }
2645
+ let dialogRef = this.dialog.open(ProdutoGrupoSelecaoDialogComponent, {
2646
+ height: height,
2647
+ width: width,
2648
+ maxWidth: '100%',
2649
+ panelClass: 'dialog-p0',
2650
+ });
2651
+ dialogRef.afterClosed().subscribe(result => {
2652
+ if (result == undefined)
2653
+ return;
2654
+ if (!this.model)
2655
+ return;
2656
+ this.model.grupoId = result.id;
2657
+ this.model.grupoNome = result.nome;
2658
+ });
2659
+ }
2660
+ editarCategoriaCardapio() {
2661
+ let height = (window.innerHeight * 0.95) + 'px';
2662
+ let width = 550 + 'px';
2663
+ if (this.screenHelper.mobileScreen) {
2664
+ width = (window.innerWidth * 0.99) + 'px';
2665
+ height = (window.innerHeight * 0.99) + 'px';
2666
+ }
2667
+ let dialogRef = this.dialog.open(ProdutoCategoriaCardapioSelecaoDialogComponent, {
2668
+ height: height,
2669
+ width: width,
2670
+ maxWidth: '100%',
2671
+ panelClass: 'dialog-p0',
2672
+ });
2673
+ dialogRef.afterClosed().subscribe(result => {
2674
+ if (result == undefined)
2675
+ return;
2676
+ if (!this.model)
2677
+ return;
2678
+ this.model.categoriaCardapioId = result.id;
2679
+ this.model.categoriaCardapioNome = result.nome;
2680
+ });
2681
+ }
2682
+ changeModo(ev) {
2683
+ this.selectedTab = ev.value;
2684
+ }
2685
+ uploadFile(files) {
2686
+ if (!this.model)
2687
+ return;
2688
+ if (files.length === 0) {
2689
+ return;
2690
+ }
2691
+ let fileToUpload = files[0];
2692
+ const formData = new FormData();
2693
+ formData.append('file', fileToUpload, fileToUpload.name);
2694
+ this.http.post(this.ws.PRODUTO_BASE_URL + "Imagem?produtoId=" + this.model.id, formData, {
2695
+ reportProgress: true,
2696
+ observe: 'events',
2697
+ headers: {
2698
+ "Authorization": 'token ' + this.auth.token,
2699
+ }
2700
+ })
2701
+ .subscribe(event => {
2702
+ if (event.type === HttpEventType.UploadProgress) {
2703
+ const total = event.total ?? -1;
2704
+ this.progress = Math.round(100 * event.loaded / total);
2705
+ }
2706
+ else if (event.type === HttpEventType.Response) {
2707
+ this.message = 'Sucesso';
2708
+ this.imgUrl = undefined;
2709
+ setTimeout(() => {
2710
+ this.setImgUrl(new Date().getMinutes() + "");
2711
+ }, 1000);
2712
+ }
2713
+ }, err => {
2714
+ const httpError = err;
2715
+ this.message = httpError.error;
2716
+ });
2717
+ }
2718
+ setImgUrl(upload = undefined) {
2719
+ if (!this.model)
2720
+ return;
2721
+ this.imgUrl = this.ws.MEDIA_PRODUTO_IMAGEM_URL +
2722
+ '?produtoId=' + this.model.id +
2723
+ '&token=' + this.auth.token +
2724
+ (upload !== undefined ? '&upload=' + upload : '');
2725
+ }
2726
+ findNCM() {
2727
+ this.ncmEncontrado = false;
2728
+ this.ncmNaoEncontrado = false;
2729
+ if (!this.model)
2730
+ return;
2731
+ if (!this.model.ncm)
2732
+ return;
2733
+ this.isBusy = true;
2734
+ this.ws.findNcm(this.model.ncm)
2735
+ .subscribe(r => {
2736
+ this.ncmEncontrado = r != null;
2737
+ this.ncmNaoEncontrado = r == null;
2738
+ console.info(r);
2739
+ this.isBusy = false;
2740
+ }, err => {
2741
+ this.isBusy = false;
2742
+ this.notification.showHttpError(err);
2743
+ });
2744
+ }
2745
+ }
2746
+ ProdutoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, deps: [{ token: i3.MatDialog }, { token: CommonWebService }, { token: i1.HttpClient }, { token: AuthDataService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2747
+ ProdutoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoFormComponent, selector: "app-produto-form", inputs: { editMode: "editMode", model: "model" }, outputs: { nextIdClick: "nextIdClick" }, ngImport: i0, template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: ["selectedItem", "items"], outputs: ["change"] }, { kind: "pipe", type: i6.DecimalPipe, name: "number" }], animations: [lateralAnimation] });
2748
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, decorators: [{
2749
+ type: Component,
2750
+ args: [{ selector: 'app-produto-form', animations: [lateralAnimation], template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"] }]
2751
+ }], ctorParameters: function () { return [{ type: i3.MatDialog }, { type: CommonWebService }, { type: i1.HttpClient }, { type: AuthDataService }, { type: NotificationService }, { type: ScreenHelperService }]; }, propDecorators: { editMode: [{
2752
+ type: Input
2753
+ }], nextIdClick: [{
2754
+ type: Output
2755
+ }], model: [{
2756
+ type: Input
2757
+ }] } });
2758
+
2759
+ class ProdutoAddDialogComponent {
2760
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2761
+ this.ws = ws;
2762
+ this.notification = notification;
2763
+ this.dataDialog = dataDialog;
2764
+ this.dialog = dialog;
2765
+ this.elRef = elRef;
2766
+ this.dialogRef = dialogRef;
2767
+ this.screenHelper = screenHelper;
2768
+ this.isBusy = false;
2769
+ this.focus = new FocusService();
2770
+ this.model = createProduct();
2771
+ this.mobile = this.screenHelper.isMedium;
2772
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2773
+ }
2774
+ ngOnInit() {
2775
+ this.focus.registerElement(this.elRef.nativeElement);
2776
+ this.getNextId();
2777
+ }
2778
+ ngOnDestroy() {
2779
+ this.focus.unregisterElement(this.elRef.nativeElement);
2780
+ }
2781
+ salvar() {
2782
+ if (!this.model)
2783
+ return;
2784
+ const valMsg = valida$1(this.model, this.focus);
2785
+ if (valMsg) {
2786
+ this.notification.showMsgError(valMsg);
2787
+ return;
2788
+ }
2789
+ this.isBusy = true;
2790
+ this.ws.addProduto(this.model)
2791
+ .subscribe(r => {
2792
+ this.isBusy = false;
2793
+ this.notification.showMsg("Salvo com sucesso.");
2794
+ if (this.dialogRef)
2795
+ this.dialogRef.close(true);
2796
+ }, err => {
2797
+ this.isBusy = false;
2798
+ this.notification.showMsg(err.error);
2799
+ });
2800
+ }
2801
+ getNextId() {
2802
+ this.isBusy = true;
2803
+ this.ws.getNextIdProduto()
2804
+ .subscribe(r => {
2805
+ this.model.id = r;
2806
+ this.model.referencia = '' + r;
2807
+ this.isBusy = false;
2808
+ }, err => {
2809
+ this.isBusy = false;
2810
+ this.notification.showMsg(err.error);
2811
+ });
2812
+ }
2813
+ }
2814
+ ProdutoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2815
+ ProdutoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoAddDialogComponent, selector: "app-produto-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoFormComponent, selector: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
2816
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, decorators: [{
2817
+ type: Component,
2818
+ args: [{ selector: 'app-produto-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2819
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2820
+ type: Inject,
2821
+ args: [MAT_DIALOG_DATA]
2822
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2823
+
2824
+ class ProdutoBuscaFiltrosDialogComponent {
2825
+ constructor(d, ws, notification, dialogRef) {
2826
+ this.d = d;
2827
+ this.ws = ws;
2828
+ this.notification = notification;
2829
+ this.dialogRef = dialogRef;
2830
+ this.isBusy = false;
2831
+ this.produtosGrupos = [];
2832
+ this.d.setting.grupos = undefined;
2833
+ }
2834
+ ngOnInit() {
2835
+ this.getProdutos();
2836
+ }
2837
+ getProdutos() {
2838
+ this.isBusy = true;
2839
+ this.ws.getAllProdutoGrupo()
2840
+ .subscribe(r => {
2841
+ this.produtosGrupos = r;
2842
+ console.info(r);
2843
+ this.isBusy = false;
2844
+ }, err => {
2845
+ this.isBusy = false;
2846
+ this.notification.showHttpError(err);
2847
+ });
2848
+ }
2849
+ salvar() {
2850
+ this.dialogRef.close(this.d);
2851
+ }
2852
+ changeGruposProdutos(ev) {
2853
+ const itens = ev.value;
2854
+ this.d.setting.grupos = itens;
2855
+ }
2856
+ }
2857
+ ProdutoBuscaFiltrosDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
2858
+ ProdutoBuscaFiltrosDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoBuscaFiltrosDialogComponent, selector: "app-produto-busca-filtros-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <span class=\"titulo\">Filtros de Pesquisa</span>\n <button mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <h4>Op\u00E7\u00F5es de exibi\u00E7\u00E3o</h4>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeNaoControladoEstoque\" tabindex=-1>Exibir n\u00E3o controlado no\n estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeApenasMostraRecepcao\" tabindex=-1>Apenas o que mostra na recep\u00E7\u00E3o\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeImprimiCozinha\" tabindex=-1>Exibir imprime na cozinha\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeInativo\" tabindex=-1>Exibir desativados</mat-slide-toggle>\n </div>\n <div class=\"vbox margin-top-16\">\n <h4>Selecione um ou mais grupos</h4>\n <mat-select (selectionChange)=\"changeGruposProdutos($event)\" multiple>\n <mat-option *ngFor=\"let i of produtosGrupos\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"vbox margin-top-32\">\n <h4>Quantidade de Itens por P\u00E1gina</h4>\n\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input [(ngModel)]=\"d.qtd\" class=\"form-control input-120\" maxlength=\"10\" type=\"number\">\n </div>\n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button (click)=\"salvar()\">CONFIRMAR</button>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;margin-left:16px;text-transform:uppercase;flex-grow:1}mat-select{background:white;height:36px;padding:8px 16px;border-radius:.25rem;border:1px solid #ced4da}h4{margin:0 0 16px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
2859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, decorators: [{
2860
+ type: Component,
2861
+ args: [{ selector: 'app-produto-busca-filtros-dialog', template: "<div class=\"ox-header\">\n <span class=\"titulo\">Filtros de Pesquisa</span>\n <button mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <h4>Op\u00E7\u00F5es de exibi\u00E7\u00E3o</h4>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeNaoControladoEstoque\" tabindex=-1>Exibir n\u00E3o controlado no\n estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeApenasMostraRecepcao\" tabindex=-1>Apenas o que mostra na recep\u00E7\u00E3o\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeImprimiCozinha\" tabindex=-1>Exibir imprime na cozinha\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeInativo\" tabindex=-1>Exibir desativados</mat-slide-toggle>\n </div>\n <div class=\"vbox margin-top-16\">\n <h4>Selecione um ou mais grupos</h4>\n <mat-select (selectionChange)=\"changeGruposProdutos($event)\" multiple>\n <mat-option *ngFor=\"let i of produtosGrupos\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"vbox margin-top-32\">\n <h4>Quantidade de Itens por P\u00E1gina</h4>\n\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input [(ngModel)]=\"d.qtd\" class=\"form-control input-120\" maxlength=\"10\" type=\"number\">\n </div>\n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button (click)=\"salvar()\">CONFIRMAR</button>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;margin-left:16px;text-transform:uppercase;flex-grow:1}mat-select{background:white;height:36px;padding:8px 16px;border-radius:.25rem;border:1px solid #ced4da}h4{margin:0 0 16px}\n"] }]
2862
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2863
+ type: Inject,
2864
+ args: [MAT_DIALOG_DATA]
2865
+ }] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }]; } });
2866
+
2867
+ class ProdutoEditDialogComponent {
2868
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
2869
+ this.ws = ws;
2870
+ this.notification = notification;
2871
+ this.dataDialog = dataDialog;
2872
+ this.dialog = dialog;
2873
+ this.elRef = elRef;
2874
+ this.dialogRef = dialogRef;
2875
+ this.screenHelper = screenHelper;
2876
+ this.isBusy = false;
2877
+ this.focus = new FocusService();
2878
+ if (dataDialog) {
2879
+ this.model = dataDialog;
2880
+ }
2881
+ this.mobile = this.screenHelper.isMedium;
2882
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2883
+ }
2884
+ ngOnInit() {
2885
+ this.focus.registerElement(this.elRef.nativeElement);
2886
+ }
2887
+ ngOnDestroy() {
2888
+ this.focus.unregisterElement(this.elRef.nativeElement);
2889
+ }
2890
+ salvar() {
2891
+ if (!this.model)
2892
+ return;
2893
+ const valMsg = valida$1(this.model, this.focus);
2894
+ if (valMsg) {
2895
+ this.notification.showMsgError(valMsg);
2896
+ return;
2897
+ }
2898
+ this.isBusy = true;
2899
+ this.ws.saveProduto(this.model)
2900
+ .subscribe(r => {
2901
+ this.isBusy = false;
2902
+ this.notification.showMsg("Salvo com sucesso.");
2903
+ if (this.dialogRef)
2904
+ this.dialogRef.close(true);
2905
+ }, err => {
2906
+ this.isBusy = false;
2907
+ this.notification.showMsg(err.error);
2908
+ });
2909
+ }
2910
+ }
2911
+ ProdutoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
2912
+ ProdutoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoEditDialogComponent, selector: "app-produto-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoFormComponent, selector: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
2913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, decorators: [{
2914
+ type: Component,
2915
+ args: [{ selector: 'app-produto-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
2916
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
2917
+ type: Inject,
2918
+ args: [MAT_DIALOG_DATA]
2919
+ }] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
2920
+
2921
+ class ProdutosComponent {
2922
+ constructor(ws, notification, dialog, auth, screenHelper) {
2923
+ this.ws = ws;
2924
+ this.notification = notification;
2925
+ this.dialog = dialog;
2926
+ this.screenHelper = screenHelper;
2927
+ this.isBusy = false;
2928
+ this.items = [];
2929
+ this.result = {
2930
+ finalQtd: 0,
2931
+ inicioQtd: 0,
2932
+ items: [],
2933
+ pagina: 0,
2934
+ quantidade: 0,
2935
+ valor: 0,
2936
+ totalPaginas: 0
2937
+ };
2938
+ this._selectedItem = null;
2939
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
2940
+ this.setting = new ProdutoSearchSetting();
2941
+ this.focus = new FocusService();
2942
+ this.paginaAtual = 1;
2943
+ this.quantidadePagina = 50;
2944
+ this.allowAdd = auth.permissoes.adminProdutoAdd;
2945
+ this.allowExcluir = auth.permissoes.adminProdutoDelete;
2946
+ this.mobile = this.screenHelper.isMedium;
2947
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
2948
+ this.setting.exibeNaoControladoEstoque = true;
2949
+ this.setting.exibeImprimiCozinha = true;
2950
+ }
2951
+ get selectedItem() {
2952
+ return this._selectedItem;
2953
+ }
2954
+ set selectedItem(p) {
2955
+ this._selectedItem = p;
2956
+ }
2957
+ ngOnInit() {
2958
+ this.setting.ordem = "nome";
2959
+ this.atualiza();
2960
+ }
2961
+ onSelectItem() {
2962
+ if (!this.focus.hasInit()) {
2963
+ setTimeout(() => {
2964
+ this.focus.registerElementById("form-column");
2965
+ this.focus.setFirst();
2966
+ }, 500);
2967
+ //this._focus.registerElementById("form-column");
2968
+ }
2969
+ else {
2970
+ this.focus.setFirst();
2971
+ }
2972
+ }
2973
+ ngOnDestroy() {
2974
+ this.focus.unregisterElementById("form-column");
2975
+ }
2976
+ trocaPagina() {
2977
+ this.atualiza(this.paginaAtual);
2978
+ }
2979
+ atualiza(pagina) {
2980
+ if (pagina == undefined)
2981
+ this.paginaAtual = 1;
2982
+ else
2983
+ this.paginaAtual = pagina;
2984
+ this.isBusy = true;
2985
+ this.ws.buscaPaginadaProdutos(this.setting, this.paginaAtual, this.quantidadePagina)
2986
+ .subscribe(r => {
2987
+ this.items = r.items;
2988
+ this.result = r;
2989
+ this.selectedItem = null;
2990
+ console.info(r);
2991
+ this.isBusy = false;
2992
+ }, err => {
2993
+ this.isBusy = false;
2994
+ this.notification.showHttpError(err);
2995
+ });
2996
+ }
2997
+ excluir() {
2998
+ const item = this.selectedItem;
2999
+ if (!item)
3000
+ return;
3001
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto ${item.nome}?`, () => {
3002
+ this.isBusy = true;
3003
+ this.ws.deleteProduto(item.id)
3004
+ .subscribe(r => {
3005
+ this.notification.showMsg("O produto foi excluído com sucesso.");
3006
+ this.items.remove(item);
3007
+ this.selectedItem = null;
3008
+ this.isBusy = false;
3009
+ }, err => {
3010
+ this.isBusy = false;
3011
+ this.notification.showMsg(err.error);
3012
+ });
3013
+ });
3014
+ }
3015
+ novo() {
3016
+ let height = (window.innerHeight * 0.90) + 'px';
3017
+ let width = 550 + 'px';
3018
+ if (this.mobile) {
3019
+ width = (window.innerWidth * 0.99) + 'px';
3020
+ //height = (window.innerHeight * 0.98) + 'px';
3021
+ }
3022
+ const dialog = this.dialog.open(ProdutoAddDialogComponent, {
3023
+ width: width,
3024
+ height: height,
3025
+ maxWidth: '100%',
3026
+ panelClass: 'dialog-p0',
3027
+ });
3028
+ dialog.afterClosed().subscribe(result => {
3029
+ if (result === undefined)
3030
+ return;
3031
+ this.notification.showMsg("Salvo com sucesso.");
3032
+ this.atualiza();
3033
+ });
3034
+ }
3035
+ abreCadastro(item) {
3036
+ let height = undefined;
3037
+ let width = 550 + 'px';
3038
+ if (this.mobile) {
3039
+ width = (window.innerWidth * 0.99) + 'px';
3040
+ height = (window.innerHeight * 0.99) + 'px';
3041
+ }
3042
+ const dialog = this.dialog.open(ProdutoEditDialogComponent, {
3043
+ data: item,
3044
+ width: width,
3045
+ height: height,
3046
+ maxWidth: '100%',
3047
+ panelClass: 'dialog-p0',
3048
+ });
3049
+ dialog.afterClosed().subscribe(result => {
3050
+ if (result !== true)
3051
+ return;
3052
+ this.notification.showMsg("Salvo com sucesso.");
3053
+ this.atualiza();
3054
+ });
3055
+ }
3056
+ salvar() {
3057
+ if (!this.selectedItem)
3058
+ return;
3059
+ const valMsg = valida$1(this.selectedItem, this.focus);
3060
+ if (valMsg) {
3061
+ this.notification.showMsgError(valMsg);
3062
+ return;
3063
+ }
3064
+ this.isBusy = true;
3065
+ this.ws.saveProduto(this.selectedItem)
3066
+ .subscribe(r => {
3067
+ this.notification.showMsg("Salvo com sucesso.");
3068
+ this.isBusy = false;
3069
+ }, err => {
3070
+ this.isBusy = false;
3071
+ this.notification.showMsg(err.error);
3072
+ });
3073
+ }
3074
+ filtros() {
3075
+ let height = undefined;
3076
+ let width = 550 + 'px';
3077
+ if (this.mobile) {
3078
+ width = (window.innerWidth * 0.99) + 'px';
3079
+ height = (window.innerHeight * 0.99) + 'px';
3080
+ }
3081
+ const p = {
3082
+ qtd: this.quantidadePagina,
3083
+ setting: this.setting
3084
+ };
3085
+ const dialog = this.dialog.open(ProdutoBuscaFiltrosDialogComponent, {
3086
+ data: p,
3087
+ width: width,
3088
+ height: height,
3089
+ maxWidth: '100%',
3090
+ panelClass: 'dialog-p0',
3091
+ });
3092
+ dialog.afterClosed().subscribe(result => {
3093
+ if (!result)
3094
+ return;
3095
+ const r = result;
3096
+ this.quantidadePagina = r.qtd;
3097
+ this.atualiza();
3098
+ });
3099
+ }
3100
+ }
3101
+ ProdutosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3102
+ ProdutosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosComponent, selector: "app-produtos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </app-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: PaginatorComponent, selector: "ox-paginator", inputs: ["pageSize", "paginaAtual", "totalPaginas"], outputs: ["paginaAtualChange", "totalPaginasChange", "change"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoFormComponent, selector: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, decorators: [{
3104
+ type: Component,
3105
+ args: [{ selector: 'app-produtos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </app-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"] }]
3106
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3107
+
3108
+ class MoverGrupoDialogComponent {
3109
+ constructor(ws, dialogRef, notification, dataDialog) {
3110
+ this.ws = ws;
3111
+ this.dialogRef = dialogRef;
3112
+ this.notification = notification;
3113
+ this.dataDialog = dataDialog;
3114
+ this.grupos = [];
3115
+ this.selected = null;
3116
+ this.isBusy = false;
3117
+ }
3118
+ ngOnInit() {
3119
+ this.atualiza();
3120
+ }
3121
+ atualiza() {
3122
+ this.isBusy = true;
3123
+ this.ws.getAllProdutoGrupo()
3124
+ .subscribe(r => {
3125
+ this.grupos = r;
3126
+ console.info(r);
3127
+ this.isBusy = false;
3128
+ }, err => {
3129
+ this.isBusy = false;
3130
+ this.notification.showHttpError(err);
3131
+ });
3132
+ }
3133
+ salvar() {
3134
+ if (!this.selected) {
3135
+ this.notification.showMsgError("Selecione um novo grupo.");
3136
+ return;
3137
+ }
3138
+ this.isBusy = true;
3139
+ this.ws.transfereProdutoGrupo(this.dataDialog.id, this.selected.id)
3140
+ .subscribe(r => {
3141
+ console.info(r);
3142
+ this.notification.showMsg(`${r} produtos foram atualizados com sucesso.`);
3143
+ this.dialogRef.close();
3144
+ this.isBusy = false;
3145
+ }, err => {
3146
+ this.isBusy = false;
3147
+ this.notification.showHttpError(err);
3148
+ });
3149
+ }
3150
+ }
3151
+ MoverGrupoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, deps: [{ token: CommonWebService }, { token: i3.MatDialogRef }, { token: NotificationService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
3152
+ MoverGrupoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MoverGrupoDialogComponent, selector: "app-mover-grupo-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Transferir Produtos para um Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <p *ngIf=\"!selected\">Voc\u00EA pode transferir todos os produtos que utilizam o grupo <strong>'{{dataDialog.nome}}'</strong> para outro grupo.</p>\n <p class=\"alert alert-warning\" *ngIf=\"selected\">Transferir produtos com grupo '{{dataDialog.nome}}'' para '{{selected?.nome}}'</p>\n <h4>Selecione um novo grupo para transferir os produtos do grupo</h4>\n \n <mat-select class=\"form-group\" [(value)]=\"selected\">\n <mat-option *ngFor=\"let i of grupos\" [value]=\"i\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n \n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
3153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, decorators: [{
3154
+ type: Component,
3155
+ args: [{ selector: 'app-mover-grupo-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Transferir Produtos para um Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <p *ngIf=\"!selected\">Voc\u00EA pode transferir todos os produtos que utilizam o grupo <strong>'{{dataDialog.nome}}'</strong> para outro grupo.</p>\n <p class=\"alert alert-warning\" *ngIf=\"selected\">Transferir produtos com grupo '{{dataDialog.nome}}'' para '{{selected?.nome}}'</p>\n <h4>Selecione um novo grupo para transferir os produtos do grupo</h4>\n \n <mat-select class=\"form-group\" [(value)]=\"selected\">\n <mat-option *ngFor=\"let i of grupos\" [value]=\"i\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n \n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
3156
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: i3.MatDialogRef }, { type: NotificationService }, { type: undefined, decorators: [{
3157
+ type: Inject,
3158
+ args: [MAT_DIALOG_DATA]
3159
+ }] }]; } });
3160
+
3161
+ class ProdutosGruposComponent {
3162
+ constructor(ws, notification, dialog, auth, screenHelper) {
3163
+ this.ws = ws;
3164
+ this.notification = notification;
3165
+ this.dialog = dialog;
3166
+ this.screenHelper = screenHelper;
3167
+ this.isBusy = false;
3168
+ this.items = [];
3169
+ this.selectedItem = null;
3170
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
3171
+ this.setting = new SearchSetting();
3172
+ this.focus = new FocusService();
3173
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
3174
+ this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
3175
+ this.mobile = this.screenHelper.isMedium;
3176
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
3177
+ }
3178
+ ngOnInit() {
3179
+ this.setting.ordem = "nome";
3180
+ this.atualiza();
3181
+ }
3182
+ onSelectItem() {
3183
+ if (!this.focus.hasInit()) {
3184
+ setTimeout(() => {
3185
+ this.focus.registerElementById("form-column");
3186
+ this.focus.setFirst();
3187
+ }, 500);
3188
+ //this._focus.registerElementById("form-column");
3189
+ }
3190
+ else {
3191
+ this.focus.setFirst();
3192
+ }
3193
+ }
3194
+ ngOnDestroy() {
3195
+ this.focus.unregisterElementById("form-column");
3196
+ }
3197
+ atualiza() {
3198
+ this.isBusy = true;
3199
+ this.ws.buscaProdutoGrupo(this.setting)
3200
+ .subscribe(r => {
3201
+ this.items = r;
3202
+ this.selectedItem = null;
3203
+ console.info(r);
3204
+ this.isBusy = false;
3205
+ }, err => {
3206
+ this.isBusy = false;
3207
+ this.notification.showHttpError(err);
3208
+ });
3209
+ }
3210
+ excluir() {
3211
+ const item = this.selectedItem;
3212
+ if (!item)
3213
+ return;
3214
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
3215
+ this.isBusy = true;
3216
+ this.ws.deleteProdutoGrupo(item.id)
3217
+ .subscribe(r => {
3218
+ this.notification.showMsg("O grupo foi excluído com sucesso.");
3219
+ this.items.remove(item);
3220
+ this.selectedItem = null;
3221
+ this.isBusy = false;
3222
+ }, err => {
3223
+ this.isBusy = false;
3224
+ this.notification.showMsg(err.error);
3225
+ });
3226
+ });
3227
+ }
3228
+ novo() {
3229
+ let height = (window.innerHeight * 0.90) + 'px';
3230
+ let width = 550 + 'px';
3231
+ if (this.mobile) {
3232
+ width = (window.innerWidth * 0.99) + 'px';
3233
+ //height = (window.innerHeight * 0.98) + 'px';
3234
+ }
3235
+ const dialog = this.dialog.open(ProdutoGrupoAddDialogComponent, {
3236
+ width: width,
3237
+ //height: height,
3238
+ maxWidth: '100%',
3239
+ panelClass: 'dialog-p0',
3240
+ });
3241
+ dialog.afterClosed().subscribe(result => {
3242
+ if (result === undefined)
3243
+ return;
3244
+ this.notification.showMsg("Salvo com sucesso.");
3245
+ this.atualiza();
3246
+ });
3247
+ }
3248
+ abreCadastro(item) {
3249
+ let height = undefined;
3250
+ let width = 550 + 'px';
3251
+ if (this.mobile) {
3252
+ width = (window.innerWidth * 0.99) + 'px';
3253
+ height = (window.innerHeight * 0.99) + 'px';
3254
+ }
3255
+ const dialog = this.dialog.open(ProdutoGrupoEditDialogComponent, {
3256
+ data: item,
3257
+ width: width,
3258
+ //height: height,
3259
+ maxWidth: '100%',
3260
+ panelClass: 'dialog-p0',
3261
+ });
3262
+ dialog.afterClosed().subscribe(result => {
3263
+ if (result !== true)
3264
+ return;
3265
+ this.notification.showMsg("Salvo com sucesso.");
3266
+ this.atualiza();
3267
+ });
3268
+ }
3269
+ salvar() {
3270
+ const item = this.selectedItem;
3271
+ if (!item)
3272
+ return;
3273
+ const valMsg = valida(item, this.focus);
3274
+ if (valMsg) {
3275
+ this.notification.showMsgError(valMsg);
3276
+ return;
3277
+ }
3278
+ this.isBusy = true;
3279
+ this.ws.saveProdutoGrupo(item)
3280
+ .subscribe(r => {
3281
+ this.notification.showMsg("Salvo com sucesso.");
3282
+ this.isBusy = false;
3283
+ }, err => {
3284
+ this.isBusy = false;
3285
+ this.notification.showMsg(err.error);
3286
+ });
3287
+ }
3288
+ moverGrupo() {
3289
+ let height = (window.innerHeight * 0.90) + 'px';
3290
+ let width = 550 + 'px';
3291
+ if (this.mobile) {
3292
+ width = (window.innerWidth * 0.99) + 'px';
3293
+ //height = (window.innerHeight * 0.98) + 'px';
3294
+ }
3295
+ const dialog = this.dialog.open(MoverGrupoDialogComponent, {
3296
+ width: width,
3297
+ data: this.selectedItem,
3298
+ //height: height,
3299
+ maxWidth: '100%',
3300
+ panelClass: 'dialog-p0',
3301
+ });
3302
+ dialog.afterClosed().subscribe(result => {
3303
+ if (result === undefined)
3304
+ return;
3305
+ this.notification.showMsg("Salvo com sucesso.");
3306
+ this.atualiza();
3307
+ });
3308
+ }
3309
+ }
3310
+ ProdutosGruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3311
+ ProdutosGruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosGruposComponent, selector: "app-produtos-grupos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">sync_alt</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">move_up</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, decorators: [{
3313
+ type: Component,
3314
+ args: [{ selector: 'app-produtos-grupos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">sync_alt</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">move_up</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
3315
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3316
+
3317
+ class ProdutosSubgruposComponent {
3318
+ constructor(ws, notification, dialog, auth, screenHelper) {
3319
+ this.ws = ws;
3320
+ this.notification = notification;
3321
+ this.dialog = dialog;
3322
+ this.screenHelper = screenHelper;
3323
+ this.isBusy = false;
3324
+ this.items = [];
3325
+ this.selectedItem = null;
3326
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
3327
+ this.setting = new SearchSetting();
3328
+ this.focus = new FocusService();
3329
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
3330
+ this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
3331
+ this.mobile = this.screenHelper.isMedium;
3332
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
3333
+ }
3334
+ ngOnInit() {
3335
+ this.setting.ordem = "nome";
3336
+ this.atualiza();
3337
+ }
3338
+ onSelectItem() {
3339
+ if (!this.focus.hasInit()) {
3340
+ setTimeout(() => {
3341
+ this.focus.registerElementById("form-column");
3342
+ this.focus.setFirst();
3343
+ }, 500);
3344
+ //this._focus.registerElementById("form-column");
3345
+ }
3346
+ else {
3347
+ this.focus.setFirst();
3348
+ }
3349
+ }
3350
+ ngOnDestroy() {
3351
+ this.focus.unregisterElementById("form-column");
3352
+ }
3353
+ atualiza() {
3354
+ this.isBusy = true;
3355
+ this.ws.buscaProdutoSubgrupo(this.setting)
3356
+ .subscribe(r => {
3357
+ this.items = r;
3358
+ this.selectedItem = null;
3359
+ console.info(r);
3360
+ this.isBusy = false;
3361
+ }, err => {
3362
+ this.isBusy = false;
3363
+ this.notification.showHttpError(err);
3364
+ });
3365
+ }
3366
+ excluir() {
3367
+ const item = this.selectedItem;
3368
+ if (!item)
3369
+ return;
3370
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do subgrupo ${item.nome}?`, () => {
3371
+ this.isBusy = true;
3372
+ this.ws.deleteProdutoSubgrupo(item.id)
3373
+ .subscribe(r => {
3374
+ this.notification.showMsg("O subgrupo foi excluído com sucesso.");
3375
+ this.items.remove(item);
3376
+ this.selectedItem = null;
3377
+ this.isBusy = false;
3378
+ }, err => {
3379
+ this.isBusy = false;
3380
+ this.notification.showMsg(err.error);
3381
+ });
3382
+ });
3383
+ }
3384
+ novo() {
3385
+ let height = (window.innerHeight * 0.90) + 'px';
3386
+ let width = 550 + 'px';
3387
+ if (this.mobile) {
3388
+ width = (window.innerWidth * 0.99) + 'px';
3389
+ //height = (window.innerHeight * 0.98) + 'px';
3390
+ }
3391
+ const dialog = this.dialog.open(ProdutoSubgrupoAddDialogComponent, {
3392
+ width: width,
3393
+ //height: height,
3394
+ maxWidth: '100%',
3395
+ panelClass: 'dialog-p0',
3396
+ });
3397
+ dialog.afterClosed().subscribe(result => {
3398
+ if (result === undefined)
3399
+ return;
3400
+ this.notification.showMsg("Salvo com sucesso.");
3401
+ this.atualiza();
3402
+ });
3403
+ }
3404
+ abreCadastro(item) {
3405
+ let height = undefined;
3406
+ let width = 550 + 'px';
3407
+ if (this.mobile) {
3408
+ width = (window.innerWidth * 0.99) + 'px';
3409
+ height = (window.innerHeight * 0.99) + 'px';
3410
+ }
3411
+ const dialog = this.dialog.open(ProdutoSubgrupoEditDialogComponent, {
3412
+ data: item,
3413
+ width: width,
3414
+ //height: height,
3415
+ maxWidth: '100%',
3416
+ panelClass: 'dialog-p0',
3417
+ });
3418
+ dialog.afterClosed().subscribe(result => {
3419
+ if (result !== true)
3420
+ return;
3421
+ this.notification.showMsg("Salvo com sucesso.");
3422
+ this.atualiza();
3423
+ });
3424
+ }
3425
+ salvar() {
3426
+ if (!this.selectedItem)
3427
+ return;
3428
+ const valMsg = valida(this.selectedItem, this.focus);
3429
+ if (valMsg) {
3430
+ this.notification.showMsgError(valMsg);
3431
+ return;
3432
+ }
3433
+ this.isBusy = true;
3434
+ this.ws.saveProdutoSubgrupo(this.selectedItem)
3435
+ .subscribe(r => {
3436
+ this.notification.showMsg("Salvo com sucesso.");
3437
+ this.isBusy = false;
3438
+ }, err => {
3439
+ this.isBusy = false;
3440
+ this.notification.showMsg(err.error);
3441
+ });
3442
+ }
3443
+ }
3444
+ ProdutosSubgruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3445
+ ProdutosSubgruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosSubgruposComponent, selector: "app-produtos-subgrupos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Subgrupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Subgrupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Subgrupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um subgrupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, decorators: [{
3447
+ type: Component,
3448
+ args: [{ selector: 'app-produtos-subgrupos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Subgrupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Subgrupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Subgrupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um subgrupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
3449
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3450
+
3451
+ class ProdutosCategoriasCardapioComponent {
3452
+ constructor(ws, notification, dialog, auth, screenHelper) {
3453
+ this.ws = ws;
3454
+ this.notification = notification;
3455
+ this.dialog = dialog;
3456
+ this.screenHelper = screenHelper;
3457
+ this.isBusy = false;
3458
+ this.items = [];
3459
+ this.selectedItem = null;
3460
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
3461
+ this.setting = new SearchSetting();
3462
+ this.focus = new FocusService();
3463
+ this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
3464
+ this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
3465
+ this.mobile = this.screenHelper.isMedium;
3466
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
3467
+ }
3468
+ ngOnInit() {
3469
+ this.setting.ordem = "nome";
3470
+ this.atualiza();
3471
+ }
3472
+ onSelectItem() {
3473
+ if (!this.focus.hasInit()) {
3474
+ setTimeout(() => {
3475
+ this.focus.registerElementById("form-column");
3476
+ this.focus.setFirst();
3477
+ }, 500);
3478
+ //this._focus.registerElementById("form-column");
3479
+ }
3480
+ else {
3481
+ this.focus.setFirst();
3482
+ }
3483
+ }
3484
+ ngOnDestroy() {
3485
+ this.focus.unregisterElementById("form-column");
3486
+ }
3487
+ atualiza() {
3488
+ this.isBusy = true;
3489
+ this.ws.buscaProdutoCategoriaCardapio(this.setting)
3490
+ .subscribe(r => {
3491
+ this.items = r;
3492
+ this.selectedItem = null;
3493
+ console.info(r);
3494
+ this.isBusy = false;
3495
+ }, err => {
3496
+ this.isBusy = false;
3497
+ this.notification.showHttpError(err);
3498
+ });
3499
+ }
3500
+ excluir() {
3501
+ const item = this.selectedItem;
3502
+ if (!item)
3503
+ return;
3504
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
3505
+ this.isBusy = true;
3506
+ this.ws.deleteProdutoCategoriaCardapio(item.id)
3507
+ .subscribe(r => {
3508
+ this.notification.showMsg("O grupo foi excluído com sucesso.");
3509
+ this.items.remove(item);
3510
+ this.selectedItem = null;
3511
+ this.isBusy = false;
3512
+ }, err => {
3513
+ this.isBusy = false;
3514
+ this.notification.showMsg(err.error);
3515
+ });
3516
+ });
3517
+ }
3518
+ novo() {
3519
+ let height = (window.innerHeight * 0.90) + 'px';
3520
+ let width = 550 + 'px';
3521
+ if (this.mobile) {
3522
+ width = (window.innerWidth * 0.99) + 'px';
3523
+ //height = (window.innerHeight * 0.98) + 'px';
3524
+ }
3525
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
3526
+ width: width,
3527
+ //height: height,
3528
+ maxWidth: '100%',
3529
+ panelClass: 'dialog-p0',
3530
+ });
3531
+ dialog.afterClosed().subscribe(result => {
3532
+ if (result === undefined)
3533
+ return;
3534
+ this.notification.showMsg("Salvo com sucesso.");
3535
+ this.atualiza();
3536
+ });
3537
+ }
3538
+ abreCadastro(item) {
3539
+ let height = undefined;
3540
+ let width = 550 + 'px';
3541
+ if (this.mobile) {
3542
+ width = (window.innerWidth * 0.99) + 'px';
3543
+ height = (window.innerHeight * 0.99) + 'px';
3544
+ }
3545
+ const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
3546
+ data: item,
3547
+ width: width,
3548
+ //height: height,
3549
+ maxWidth: '100%',
3550
+ panelClass: 'dialog-p0',
3551
+ });
3552
+ dialog.afterClosed().subscribe(result => {
3553
+ if (result !== true)
3554
+ return;
3555
+ this.notification.showMsg("Salvo com sucesso.");
3556
+ this.atualiza();
3557
+ });
3558
+ }
3559
+ salvar() {
3560
+ if (!this.selectedItem)
3561
+ return;
3562
+ const valMsg = valida(this.selectedItem, this.focus);
3563
+ if (valMsg) {
3564
+ this.notification.showMsgError(valMsg);
3565
+ return;
3566
+ }
3567
+ this.isBusy = true;
3568
+ this.ws.saveProdutoCategoriaCardapio(this.selectedItem)
3569
+ .subscribe(r => {
3570
+ this.notification.showMsg("Salvo com sucesso.");
3571
+ this.isBusy = false;
3572
+ }, err => {
3573
+ this.isBusy = false;
3574
+ this.notification.showMsg(err.error);
3575
+ });
3576
+ }
3577
+ }
3578
+ ProdutosCategoriasCardapioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
3579
+ ProdutosCategoriasCardapioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosCategoriasCardapioComponent, selector: "app-produtos-categorias-cardapio", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
3580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, decorators: [{
3581
+ type: Component,
3582
+ args: [{ selector: 'app-produtos-categorias-cardapio', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <app-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </app-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
3583
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
3584
+
3585
+ Array.prototype.remove = function (item) {
3586
+ const index = this.indexOf(item);
3587
+ if (index === -1)
3588
+ return false;
3589
+ this.splice(index, 1);
3590
+ return true;
3591
+ };
3592
+ Array.prototype.firstOrNull = function () {
3593
+ if (this.length > 0)
3594
+ return this[0];
3595
+ return null;
3596
+ };
3597
+ Date.prototype.addDays = function (days) {
3598
+ var result = new Date(this);
3599
+ result.setDate(result.getDate() + days);
3600
+ return result;
3601
+ };
3602
+ class OxpiNglibModule {
3603
+ }
3604
+ OxpiNglibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3605
+ OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, declarations: [BusyIndicatorComponent,
3606
+ MonthYearPickerComponent,
3607
+ ImageViewerComponent,
3608
+ NumericPickerComponent,
3609
+ PaginatorComponent,
3610
+ CheckButtonComponent,
3611
+ RadioButtonGroupComponent,
3612
+ ItemCardComponent,
3613
+ SafeHtmlPipe,
3614
+ AlertDialogComponent,
3615
+ FuncionariosComponent,
3616
+ FuncionarioFormComponent,
3617
+ FuncionarioEditDialogComponent,
3618
+ FuncionarioAddDialogComponent,
3619
+ ProdutosComponent,
3620
+ ProdutoFormComponent,
3621
+ ProdutoAddDialogComponent,
3622
+ ProdutoBuscaFiltrosDialogComponent,
3623
+ ProdutoEditDialogComponent,
3624
+ ProdutosGruposComponent,
3625
+ MoverGrupoDialogComponent,
3626
+ ProdutoGrupoSelecaoDialogComponent,
3627
+ ProdutoGrupoAddDialogComponent,
3628
+ ProdutoGrupoEditDialogComponent,
3629
+ ProdutoGrupoFormComponent,
3630
+ ProdutosNcmDialogComponent,
3631
+ ProdutosSubgruposComponent,
3632
+ ProdutoSubgrupoSelecaoDialogComponent,
3633
+ ProdutoSubgrupoAddDialogComponent,
3634
+ ProdutoSubgrupoEditDialogComponent,
3635
+ ProdutosCategoriasCardapioComponent,
3636
+ ProdutoCategoriaCardapioAddDialogComponent,
3637
+ ProdutoCategoriaCardapioEditDialogComponent,
3638
+ ProdutoCategoriaCardapioSelecaoDialogComponent], imports: [BrowserModule,
3639
+ BrowserAnimationsModule,
3640
+ FormsModule,
3641
+ MatButtonModule,
3642
+ MatIconModule,
3643
+ MatDialogModule,
3644
+ MatSelectModule,
3645
+ MatAutocompleteModule], exports: [BusyIndicatorComponent,
3646
+ MonthYearPickerComponent,
3647
+ ImageViewerComponent,
3648
+ NumericPickerComponent,
3649
+ PaginatorComponent,
3650
+ CheckButtonComponent,
3651
+ RadioButtonGroupComponent,
3652
+ ItemCardComponent,
3653
+ SafeHtmlPipe] });
3654
+ OxpiNglibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, imports: [BrowserModule,
3655
+ BrowserAnimationsModule,
3656
+ FormsModule,
3657
+ MatButtonModule,
3658
+ MatIconModule,
3659
+ MatDialogModule,
3660
+ MatSelectModule,
3661
+ MatAutocompleteModule] });
3662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, decorators: [{
3663
+ type: NgModule,
3664
+ args: [{
3665
+ declarations: [
3666
+ BusyIndicatorComponent,
3667
+ MonthYearPickerComponent,
3668
+ ImageViewerComponent,
3669
+ NumericPickerComponent,
3670
+ PaginatorComponent,
3671
+ CheckButtonComponent,
3672
+ RadioButtonGroupComponent,
3673
+ ItemCardComponent,
3674
+ SafeHtmlPipe,
3675
+ AlertDialogComponent,
3676
+ FuncionariosComponent,
3677
+ FuncionarioFormComponent,
3678
+ FuncionarioEditDialogComponent,
3679
+ FuncionarioAddDialogComponent,
3680
+ ProdutosComponent,
3681
+ ProdutoFormComponent,
3682
+ ProdutoAddDialogComponent,
3683
+ ProdutoBuscaFiltrosDialogComponent,
3684
+ ProdutoEditDialogComponent,
3685
+ ProdutosGruposComponent,
3686
+ MoverGrupoDialogComponent,
3687
+ ProdutoGrupoSelecaoDialogComponent,
3688
+ ProdutoGrupoAddDialogComponent,
3689
+ ProdutoGrupoEditDialogComponent,
3690
+ ProdutoGrupoFormComponent,
3691
+ ProdutosNcmDialogComponent,
3692
+ ProdutosSubgruposComponent,
3693
+ ProdutoSubgrupoSelecaoDialogComponent,
3694
+ ProdutoSubgrupoAddDialogComponent,
3695
+ ProdutoSubgrupoEditDialogComponent,
3696
+ ProdutosCategoriasCardapioComponent,
3697
+ ProdutoCategoriaCardapioAddDialogComponent,
3698
+ ProdutoCategoriaCardapioEditDialogComponent,
3699
+ ProdutoCategoriaCardapioSelecaoDialogComponent
3700
+ ],
3701
+ imports: [
3702
+ BrowserModule,
3703
+ BrowserAnimationsModule,
3704
+ FormsModule,
3705
+ MatButtonModule,
3706
+ MatIconModule,
3707
+ MatDialogModule,
3708
+ MatSelectModule,
3709
+ MatAutocompleteModule,
3710
+ ],
3711
+ exports: [
3712
+ BusyIndicatorComponent,
3713
+ MonthYearPickerComponent,
3714
+ ImageViewerComponent,
3715
+ NumericPickerComponent,
3716
+ PaginatorComponent,
3717
+ CheckButtonComponent,
3718
+ RadioButtonGroupComponent,
3719
+ ItemCardComponent,
3720
+ SafeHtmlPipe
3721
+ ]
3722
+ }]
3723
+ }] });
3724
+
3725
+ class BusyState {
3726
+ constructor() {
3727
+ this.isBusy = false;
3728
+ this.counter = 0;
3729
+ }
3730
+ show() {
3731
+ this.counter++;
3732
+ this.isBusy = true;
3733
+ }
3734
+ hide() {
3735
+ this.counter--;
3736
+ if (this.counter < 0)
3737
+ this.counter = 0;
3738
+ if (this.counter == 0)
3739
+ this.isBusy = false;
3740
+ }
3741
+ }
3742
+
3743
+ class Ordem {
3744
+ constructor(ordens, isCrescente, onToggle) {
3745
+ const d = ordens.filter(x => x.default === true).firstOrNull();
3746
+ this.colName = d === null ? ordens[0].value : d.value;
3747
+ this.isCrescente = isCrescente;
3748
+ this.onToggle = onToggle;
3749
+ }
3750
+ toggle() {
3751
+ this.isCrescente = !this.isCrescente;
3752
+ if (this.onToggle !== undefined)
3753
+ this.onToggle();
3754
+ }
3755
+ toString() {
3756
+ return this.colName + (!this.isCrescente ? " desc" : "");
3757
+ }
3758
+ }
3759
+
3760
+ function printTxt(txt) {
3761
+ const r = "<!doctype html><head><meta charset=\"utf-8\"></head><body><div style='font-family: \"Courier New\", Courier, monospace; white-space: pre-wrap;color: black;font-weight: bold;word-wrap: break-word;word-break: break-all;overflow-wrap: break-word;'>" + txt + '</div></body>';
3762
+ printHtml(r);
3763
+ }
3764
+ function printHtml(r) {
3765
+ const blob = new Blob([r], { type: 'text/html' });
3766
+ const url = window.URL.createObjectURL(blob);
3767
+ const w = window.open(url, '_blank');
3768
+ if (w != null)
3769
+ w.print();
3770
+ }
3771
+ function selectText(ev) {
3772
+ ev.target.select();
3773
+ }
3774
+
3775
+ class PagamentoRecebimentoSearchSetting extends SearchSetting {
3776
+ constructor() {
3777
+ super();
3778
+ this.exibirPagamentos = true;
3779
+ this.exibirRecebimentos = true;
3780
+ }
3781
+ }
3782
+
3783
+ class OcupacaoFilterSetting extends SearchSetting {
3784
+ constructor() {
3785
+ super();
3786
+ this.dom = false;
3787
+ this.seg = false;
3788
+ this.ter = false;
3789
+ this.qua = false;
3790
+ this.qui = false;
3791
+ this.sex = false;
3792
+ this.sab = false;
3793
+ }
3794
+ }
3795
+
3796
+ class OcupacaoSearchSetting extends OcupacaoFilterSetting {
3797
+ constructor() {
3798
+ super();
3799
+ this.dateFieldEnum = OcupacaoSearchDateField.DataBaseCaixa;
1711
3800
  }
1712
3801
  }
1713
3802
  var PorOcupacaoTipo;
@@ -1754,17 +3843,6 @@ class DuplicataSearchSetting extends SearchSetting {
1754
3843
  }
1755
3844
  }
1756
3845
 
1757
- class ProdutoSearchSetting extends SearchSetting {
1758
- constructor() {
1759
- super();
1760
- this.exibeNaoControladoEstoque = true;
1761
- this.exibeApenasMostraRecepcao = false;
1762
- this.exibeInativo = false;
1763
- this.exibeImprimiCozinha = false;
1764
- this.exibeHePrato = false;
1765
- }
1766
- }
1767
-
1768
3846
  class SuitesIntervencoesSetting extends SearchSetting {
1769
3847
  }
1770
3848