oxpi-nglib 1.0.0 → 1.0.1

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 (25) hide show
  1. package/esm2020/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.mjs +74 -0
  2. package/esm2020/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.mjs +68 -0
  3. package/esm2020/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.mjs +38 -0
  4. package/esm2020/lib/cadastros/funcionarios/funcionarios/funcionarios.component.mjs +157 -0
  5. package/esm2020/lib/models/entidades/funcionario.mjs +12 -0
  6. package/esm2020/lib/oxpi-nglib.module.mjs +28 -5
  7. package/esm2020/lib/providers/auth-data.service.mjs +219 -0
  8. package/esm2020/lib/providers/common-web-service.mjs +98 -0
  9. package/esm2020/lib/providers/notification.service.mjs +29 -0
  10. package/esm2020/public-api.mjs +8 -1
  11. package/fesm2015/oxpi-nglib.mjs +1102 -447
  12. package/fesm2015/oxpi-nglib.mjs.map +1 -1
  13. package/fesm2020/oxpi-nglib.mjs +1096 -445
  14. package/fesm2020/oxpi-nglib.mjs.map +1 -1
  15. package/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.d.ts +27 -0
  16. package/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.d.ts +27 -0
  17. package/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.d.ts +15 -0
  18. package/lib/cadastros/funcionarios/funcionarios/funcionarios.component.d.ts +36 -0
  19. package/lib/models/entidades/funcionario.d.ts +15 -0
  20. package/lib/oxpi-nglib.module.d.ts +13 -7
  21. package/lib/providers/auth-data.service.d.ts +20 -0
  22. package/lib/providers/common-web-service.d.ts +42 -0
  23. package/lib/providers/notification.service.d.ts +12 -0
  24. package/package.json +1 -1
  25. package/public-api.d.ts +7 -0
@@ -1,35 +1,1037 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, EventEmitter, Output, HostListener, Inject, Pipe, NgModule, Injectable } from '@angular/core';
3
- import * as i1 from '@angular/common';
2
+ import { Injectable, EventEmitter, Component, Input, Inject, Output, HostListener, Pipe, NgModule } from '@angular/core';
3
+ import * as i3$1 from '@angular/material/dialog';
4
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
+ import * as i1 from '@angular/common/http';
6
+ import { HttpHeaders } from '@angular/common/http';
7
+ import { map } from 'rxjs';
8
+ import * as i1$1 from '@angular/material/snack-bar';
9
+ import * as i1$2 from '@angular/common';
4
10
  import * as i2 from '@angular/material/button';
5
11
  import { MatButtonModule } from '@angular/material/button';
6
- import * as i3 from '@angular/material/icon';
12
+ import * as i7 from '@angular/material/icon';
7
13
  import { MatIconModule } from '@angular/material/icon';
8
- import * as i1$1 from '@angular/forms';
14
+ import * as i3 from '@angular/forms';
9
15
  import { FormsModule } from '@angular/forms';
10
- import * as i1$2 from '@angular/material/dialog';
11
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
16
+ import * as i4 from '@angular/material/select';
17
+ import { MatSelectModule } from '@angular/material/select';
18
+ import * as i5 from '@angular/material/core';
19
+ import { trigger, transition, style, animate } from '@angular/animations';
12
20
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
13
21
  import * as i1$3 from '@angular/platform-browser';
14
22
  import { BrowserModule } from '@angular/platform-browser';
15
- import { trigger, transition, style, animate } from '@angular/animations';
16
23
  import * as FileSaver from 'file-saver';
17
24
 
18
- class BusyIndicatorComponent {
19
- constructor() {
25
+ function valTextEmpty(v) {
26
+ return v === null ||
27
+ v === undefined ||
28
+ v.trim() === '';
29
+ }
30
+ function valNumberEmpty(v) {
31
+ return v === null ||
32
+ v === undefined ||
33
+ v === 0;
34
+ }
35
+ function valTextMax(v, max) {
36
+ return v.length > max;
37
+ }
38
+ function valNumberMin(v, min) {
39
+ if (v === null || v === undefined)
40
+ return true;
41
+ return v <= min;
42
+ }
43
+
44
+ function valida(item, focus) {
45
+ if (valTextEmpty(item.nome)) {
46
+ focus.set('nome');
47
+ return 'Digite um nome válido.';
48
+ }
49
+ if (valNumberEmpty(item.cargoId)) {
50
+ return 'Escolha um cargo.';
51
+ }
52
+ return null;
53
+ }
54
+
55
+ class FocusService {
56
+ constructor() {
57
+ }
58
+ hasInit() {
59
+ return this._element !== undefined;
60
+ }
61
+ registerElementById(name) {
62
+ this.registerElement(document.getElementById(name));
63
+ }
64
+ registerElement(element) {
65
+ if (element === null || element === undefined)
66
+ return;
67
+ this._element = element;
68
+ //this._items = this.getItems();
69
+ console.info(element);
70
+ element.addEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
71
+ }
72
+ registerWindow() {
73
+ this._element = null;
74
+ //this._items = this.getItems();
75
+ window.addEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
76
+ }
77
+ unregisterElementById(name) {
78
+ this.unregisterElement(document.getElementById(name));
79
+ }
80
+ unregisterElement(element) {
81
+ if (element === null || element === undefined)
82
+ return;
83
+ element.removeEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
84
+ }
85
+ handleKeyboardEvent(event) {
86
+ if (event.keyCode !== 13)
87
+ return;
88
+ if (event.target.nodeName === "BUTTON")
89
+ return;
90
+ const items = this.getItems();
91
+ const index = Array.prototype.indexOf.call(items, event.target);
92
+ const nextIndex = index + 1;
93
+ if (nextIndex > items.length - 1)
94
+ return;
95
+ const i = items[index + 1];
96
+ if (i.tabIndex > -1)
97
+ i.focus();
98
+ event.preventDefault();
99
+ }
100
+ setFirst() {
101
+ const el = this.getItems()[0]; //[0];
102
+ if (el !== undefined)
103
+ el.focus();
104
+ }
105
+ getItems() {
106
+ const query = this._element !== null && this._element !== undefined ?
107
+ this._element.querySelectorAll('input,button, [tabindex]:not([tabindex="-1"])') :
108
+ document.querySelectorAll('input,button, [tabindex]:not([tabindex="-1"])');
109
+ const items = [];
110
+ for (let index = 0; index < query.length; index++) {
111
+ const el = query[index];
112
+ if (el.tabIndex > 0)
113
+ items.push(el);
114
+ }
115
+ return items;
116
+ }
117
+ set(id) {
118
+ const el = document.getElementById(id);
119
+ if (el === null)
120
+ return;
121
+ el.focus();
122
+ }
123
+ }
124
+
125
+ class CommonWebService {
126
+ constructor(http) {
127
+ this.http = http;
128
+ this.ROOT_URL = '';
129
+ this.FUNCIONARIO_BASE_URL = '';
130
+ this.FUNCIONARIO_CARGO_BASE_URL = '';
131
+ this.token = '';
132
+ }
133
+ setToken(token) {
134
+ this.token = token;
135
+ }
136
+ start(rootUrl) {
137
+ this.ROOT_URL = rootUrl;
138
+ this.FUNCIONARIO_BASE_URL = rootUrl + "Funcionario/";
139
+ this.FUNCIONARIO_CARGO_BASE_URL = rootUrl + "FuncionarioCargo/";
140
+ }
141
+ getFuncionarios() {
142
+ const url = this.FUNCIONARIO_BASE_URL;
143
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
144
+ }
145
+ getFuncionariosCargos() {
146
+ const url = this.FUNCIONARIO_CARGO_BASE_URL;
147
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
148
+ }
149
+ buscaFuncionario(setting) {
150
+ const url = this.FUNCIONARIO_BASE_URL + CommonWebService.URL_PART_BUSCA;
151
+ return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
152
+ }
153
+ getNextIdFuncionario() {
154
+ const url = this.FUNCIONARIO_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
155
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
156
+ }
157
+ getAllFuncionario() {
158
+ const url = this.FUNCIONARIO_BASE_URL;
159
+ return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
160
+ }
161
+ saveFuncionario(s) {
162
+ const url = this.FUNCIONARIO_BASE_URL;
163
+ return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
164
+ }
165
+ addFuncionario(p) {
166
+ const url = this.FUNCIONARIO_BASE_URL;
167
+ return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
168
+ }
169
+ deleteFuncionario(id) {
170
+ const url = this.FUNCIONARIO_BASE_URL + id;
171
+ return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
172
+ }
173
+ getHttpOptions(parameters) {
174
+ return {
175
+ headers: new HttpHeaders({
176
+ 'Content-Type': 'application/json',
177
+ "Accept": "application/json",
178
+ "Authorization": 'token ' + this.token,
179
+ }),
180
+ params: parameters
181
+ };
182
+ }
183
+ getExcelOptions(parameters) {
184
+ return {
185
+ headers: new HttpHeaders({
186
+ 'Content-Type': 'application/json',
187
+ "Accept": "application/json",
188
+ "Authorization": 'token ' + this.token,
189
+ }),
190
+ params: parameters,
191
+ responseType: 'arraybuffer',
192
+ };
193
+ }
194
+ getHtmlOptions(parameters) {
195
+ return {
196
+ headers: new HttpHeaders({
197
+ 'Content-Type': 'application/json',
198
+ "Accept": "application/json",
199
+ "Authorization": 'token ' + this.token,
200
+ }),
201
+ params: parameters,
202
+ responseType: 'text',
203
+ };
204
+ }
205
+ }
206
+ CommonWebService.URL_PART_BUSCA = "Busca/";
207
+ CommonWebService.URL_PART_NEXT_ID = "GetNextId/";
208
+ CommonWebService.URL_PART_BUSCA_PAGINADA = "BuscaPaginada/";
209
+ CommonWebService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CommonWebService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
210
+ CommonWebService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CommonWebService, providedIn: 'root' });
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CommonWebService, decorators: [{
212
+ type: Injectable,
213
+ args: [{
214
+ providedIn: 'root'
215
+ }]
216
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
217
+
218
+ class NotificationService {
219
+ constructor(snackBar) {
220
+ this.snackBar = snackBar;
221
+ }
222
+ showHttpError(res) {
223
+ this.snackBar.open(`Ocorreu um erro de conexão. Erro ${res.status}: ${res.statusText}`);
224
+ }
225
+ showMsg(msg) {
226
+ this.snackBar.open(msg);
227
+ }
228
+ showMsgError(msg) {
229
+ this.snackBar.open(msg, undefined, {
230
+ duration: 2000,
231
+ panelClass: ['red-snackbar']
232
+ });
233
+ }
234
+ }
235
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationService, deps: [{ token: i1$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
236
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationService, providedIn: 'root' });
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationService, decorators: [{
238
+ type: Injectable,
239
+ args: [{
240
+ providedIn: 'root'
241
+ }]
242
+ }], ctorParameters: function () { return [{ type: i1$1.MatSnackBar }]; } });
243
+
244
+ const SM_WIDTH = 576;
245
+ const MD_WIDTH = 768;
246
+ const LG_WIDTH = 992;
247
+ const XL_WIDTH = 1200;
248
+ const XXL_WIDTH = 1400;
249
+ class ScreenHelperService {
250
+ constructor() {
251
+ this.changedMobileScreen = new EventEmitter();
252
+ this.changedMediumScreen = new EventEmitter();
253
+ this.changedLargeScreen = new EventEmitter();
254
+ this.changedXLargeScreen = new EventEmitter();
255
+ this.changedXXLargeScreen = new EventEmitter();
256
+ this.changedMinSmallScreen = new EventEmitter();
257
+ this.changedMinMediumScreen = new EventEmitter();
258
+ this.changedMinLargeScreen = new EventEmitter();
259
+ this.changedMinXLargeScreen = new EventEmitter();
260
+ this.changedMinXXLargeScreen = new EventEmitter();
261
+ this.mobileScreen = false;
262
+ this.isMedium = false;
263
+ this.isLarge = false;
264
+ this.isXLarge = false;
265
+ this.isXXLarge = false;
266
+ this.minSmall = false;
267
+ this.minMedium = false;
268
+ this.minLarge = false;
269
+ this.minXLarge = false;
270
+ this.minXXLarge = false;
271
+ this.determinaMobileScreen();
272
+ window.addEventListener('resize', (event) => {
273
+ this.determinaMobileScreen();
274
+ });
275
+ }
276
+ determinaMobileScreen() {
277
+ const width = window.innerWidth;
278
+ const isSmall = width <= SM_WIDTH;
279
+ const isMedium = width <= MD_WIDTH;
280
+ const isLarge = width <= LG_WIDTH;
281
+ const isXLarge = width <= XL_WIDTH;
282
+ const isXXLarge = width <= XXL_WIDTH;
283
+ const minSmall = width >= SM_WIDTH;
284
+ const minMedium = width >= MD_WIDTH;
285
+ const minLarge = width >= LG_WIDTH;
286
+ const minXLarge = width >= XL_WIDTH;
287
+ const minXXLarge = width >= XXL_WIDTH;
288
+ if (isSmall !== this.mobileScreen) {
289
+ this.changedMobileScreen.emit(isSmall);
290
+ this.mobileScreen = isSmall;
291
+ }
292
+ if (isMedium !== this.isMedium) {
293
+ this.changedMediumScreen.emit(isMedium);
294
+ this.isMedium = isMedium;
295
+ }
296
+ if (isLarge !== this.isLarge) {
297
+ this.changedLargeScreen.emit(isLarge);
298
+ this.isLarge = isLarge;
299
+ }
300
+ if (isXLarge !== this.isXLarge) {
301
+ this.changedXLargeScreen.emit(isXLarge);
302
+ this.isXLarge = isXLarge;
303
+ }
304
+ if (isXXLarge !== this.isXXLarge) {
305
+ this.changedXXLargeScreen.emit(isXXLarge);
306
+ this.isXXLarge = isXXLarge;
307
+ }
308
+ if (minSmall !== this.minSmall) {
309
+ this.changedMinSmallScreen.emit(isSmall);
310
+ this.minMedium = isSmall;
311
+ }
312
+ if (minMedium !== this.minMedium) {
313
+ this.changedMinMediumScreen.emit(isMedium);
314
+ this.minMedium = isMedium;
315
+ }
316
+ if (minLarge !== this.minLarge) {
317
+ this.changedMinLargeScreen.emit(minLarge);
318
+ this.minLarge = minLarge;
319
+ }
320
+ if (minXLarge !== this.minXLarge) {
321
+ this.changedMinXLargeScreen.emit(minXLarge);
322
+ this.minXLarge = minXLarge;
323
+ }
324
+ if (minXXLarge !== this.minXXLarge) {
325
+ this.changedMinXXLargeScreen.emit(minXXLarge);
326
+ this.minXXLarge = minXXLarge;
327
+ }
328
+ }
329
+ }
330
+ ScreenHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
331
+ ScreenHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, providedIn: 'root' });
332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, decorators: [{
333
+ type: Injectable,
334
+ args: [{
335
+ providedIn: 'root'
336
+ }]
337
+ }], ctorParameters: function () { return []; } });
338
+
339
+ class BusyIndicatorComponent {
340
+ constructor() {
341
+ this.isBusy = false;
342
+ }
343
+ ngOnInit() {
344
+ }
345
+ }
346
+ 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"] }] });
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, decorators: [{
349
+ type: Component,
350
+ 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"] }]
351
+ }], ctorParameters: function () { return []; }, propDecorators: { isBusy: [{
352
+ type: Input
353
+ }] } });
354
+
355
+ class FuncionarioFormComponent {
356
+ constructor(ws) {
357
+ this.ws = ws;
358
+ this.isBusy = false;
359
+ this.cargos = [];
360
+ }
361
+ ngOnInit() {
362
+ this.getCargos();
363
+ }
364
+ getCargos() {
365
+ this.isBusy = true;
366
+ this.ws.getFuncionariosCargos()
367
+ .subscribe(r => {
368
+ this.cargos = r;
369
+ console.info(r);
370
+ this.isBusy = false;
371
+ }, err => {
372
+ this.isBusy = false;
373
+ });
374
+ }
375
+ }
376
+ 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"] }] });
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioFormComponent, decorators: [{
379
+ type: Component,
380
+ 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>" }]
381
+ }], ctorParameters: function () { return [{ type: CommonWebService }]; }, propDecorators: { model: [{
382
+ type: Input
383
+ }] } });
384
+
385
+ class FuncionarioAddDialogComponent {
386
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
387
+ this.ws = ws;
388
+ this.notification = notification;
389
+ this.dataDialog = dataDialog;
390
+ this.dialog = dialog;
391
+ this.elRef = elRef;
392
+ this.dialogRef = dialogRef;
393
+ this.screenHelper = screenHelper;
394
+ this.isBusy = false;
395
+ this.focus = new FocusService();
396
+ this.model = {
397
+ id: 0,
398
+ nome: '',
399
+ login: '',
400
+ senha: '',
401
+ enviadoPC: false,
402
+ isAtivo: true,
403
+ cargoId: 1
404
+ };
405
+ this.mobile = this.screenHelper.isMedium;
406
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
407
+ }
408
+ ngOnInit() {
409
+ this.focus.registerElement(this.elRef.nativeElement);
410
+ }
411
+ ngOnDestroy() {
412
+ this.focus.unregisterElement(this.elRef.nativeElement);
413
+ }
414
+ salvar() {
415
+ if (this.model)
416
+ return;
417
+ const valMsg = valida(this.model, this.focus);
418
+ if (valMsg) {
419
+ this.notification.showMsgError(valMsg);
420
+ return;
421
+ }
422
+ this.isBusy = true;
423
+ this.ws.addFuncionario(this.model)
424
+ .subscribe(r => {
425
+ this.isBusy = false;
426
+ this.notification.showMsg("Salvo com sucesso.");
427
+ if (this.dialogRef)
428
+ this.dialogRef.close(true);
429
+ }, err => {
430
+ this.isBusy = false;
431
+ this.notification.showMsg(err.error);
432
+ });
433
+ }
434
+ }
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"] }] });
437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioAddDialogComponent, decorators: [{
438
+ 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"] }]
440
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
441
+ type: Inject,
442
+ args: [MAT_DIALOG_DATA]
443
+ }] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }]; } });
444
+
445
+ class FuncionarioEditDialogComponent {
446
+ constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
447
+ this.ws = ws;
448
+ this.notification = notification;
449
+ this.dataDialog = dataDialog;
450
+ this.dialog = dialog;
451
+ this.elRef = elRef;
452
+ this.dialogRef = dialogRef;
453
+ this.screenHelper = screenHelper;
454
+ this.isBusy = false;
455
+ this.focus = new FocusService();
456
+ if (dataDialog) {
457
+ this.model = dataDialog;
458
+ }
459
+ this.mobile = this.screenHelper.isMedium;
460
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
461
+ }
462
+ ngOnInit() {
463
+ this.focus.registerElement(this.elRef.nativeElement);
464
+ }
465
+ ngOnDestroy() {
466
+ this.focus.unregisterElement(this.elRef.nativeElement);
467
+ }
468
+ salvar() {
469
+ if (!this.model)
470
+ return;
471
+ const valMsg = valida(this.model, this.focus);
472
+ if (valMsg) {
473
+ this.notification.showMsgError(valMsg);
474
+ return;
475
+ }
476
+ this.isBusy = true;
477
+ this.ws.saveFuncionario(this.model)
478
+ .subscribe(r => {
479
+ this.isBusy = false;
480
+ this.notification.showMsg("Salvo com sucesso.");
481
+ if (this.dialogRef)
482
+ this.dialogRef.close(true);
483
+ }, err => {
484
+ this.isBusy = false;
485
+ this.notification.showMsg(err.error);
486
+ });
487
+ }
488
+ }
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"] }] });
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, decorators: [{
492
+ 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"] }]
494
+ }], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
495
+ type: Inject,
496
+ args: [MAT_DIALOG_DATA]
497
+ }] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }]; } });
498
+
499
+ const fadeAnimation = trigger('fade', [
500
+ transition(':enter', [
501
+ style({ transform: 'translateY(100%)', opacity: 0 }),
502
+ animate('250ms', style({ transform: 'translateY(0)', 'opacity': 1 }))
503
+ ]),
504
+ transition(':leave', [
505
+ style({ transform: 'translateY(0)', 'opacity': 1 }),
506
+ animate('250ms', style({ transform: 'translateY(100%)', 'opacity': 0 })),
507
+ ])
508
+ ]);
509
+ const menuLateralAnimation = trigger('menuLateral', [
510
+ transition(':enter', [
511
+ style({ transform: 'translateX(-100%)', opacity: 1 }),
512
+ animate('200ms', style({ transform: 'translateX(0)', 'opacity': 1 }))
513
+ ]),
514
+ transition(':leave', [
515
+ style({ 'opacity': 1 }),
516
+ animate('200ms', style({ 'opacity': 0 })),
517
+ ])
518
+ ]);
519
+
520
+ class LazyTrigger {
521
+ constructor(doFunc, timeout = 800) {
522
+ this.doFunc = doFunc;
523
+ this.timeout = timeout;
524
+ }
525
+ fire() {
526
+ console.debug("lazyTimeoutId");
527
+ if (this.lazyTimeoutId != undefined)
528
+ clearTimeout(this.lazyTimeoutId);
529
+ this.lazyTimeoutId = window.setTimeout(() => { this.doFunc(); }, this.timeout);
530
+ }
531
+ }
532
+
533
+ class AlertDialogComponent {
534
+ constructor(dialogRef, args) {
535
+ this.dialogRef = dialogRef;
536
+ this.args = args;
537
+ }
538
+ ngOnInit() {
539
+ }
540
+ }
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"] }] });
543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, decorators: [{
544
+ type: Component,
545
+ 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: [{
547
+ type: Inject,
548
+ args: [MAT_DIALOG_DATA]
549
+ }] }]; } });
550
+
551
+ class NavegacaoSelecaoDialogUtil {
552
+ constructor(view) {
553
+ this.view = view;
554
+ }
555
+ onKeyDown(event) {
556
+ console.info(event.keyCode);
557
+ let key = event.keyCode;
558
+ const selected = this.view.selectedItem;
559
+ const enterKey = 13, keyDown = 40, keyUp = 38;
560
+ if (key === enterKey) {
561
+ event.cancelBubble = true;
562
+ if (selected !== null && selected !== undefined) {
563
+ this.view.dialogRef.close(selected);
564
+ return;
565
+ }
566
+ key = keyDown;
567
+ }
568
+ if (key !== keyDown && key !== keyUp)
569
+ return;
570
+ let index = this.view.items.indexOf(selected, 0);
571
+ if (key === keyDown)
572
+ index++;
573
+ if (key === keyUp && index > 0)
574
+ index--;
575
+ if (index > (this.view.items.length - 1))
576
+ return;
577
+ this.view.selectedItem = this.view.items[index];
578
+ }
579
+ }
580
+ function confirmaExclusao(dialog, msg, continueFunc) {
581
+ const args = {
582
+ titulo: "Atenção",
583
+ msg: msg
584
+ };
585
+ const dialogRef = dialog.open(AlertDialogComponent, {
586
+ data: args
587
+ });
588
+ dialogRef.afterClosed().subscribe(dialogResult => {
589
+ if (dialogResult !== true)
590
+ return;
591
+ continueFunc();
592
+ });
593
+ }
594
+
595
+ class SearchSetting {
596
+ constructor(propChanged) {
597
+ this.propChanged = propChanged;
598
+ this._meses = ["JANEIRO", "FEVEREIRO", "MARÇO", "ABRIL", "MAIO", "JUNHO", "JULHO", "AGOSTO", "SETEMBRO", "OUTUBRO", "NOVEMBRO", "DEZEMBRO"];
599
+ this._mesesShort = ["JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ"];
600
+ const now = new Date();
601
+ const hj = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0);
602
+ console.info(hj);
603
+ this.modo = SearchMode.Mensal;
604
+ this.mes = hj.getMonth() + 1;
605
+ this.ano = hj.getFullYear();
606
+ this.inicial = hj.addDays(-30);
607
+ this.final = hj;
608
+ }
609
+ set(prop, value) {
610
+ const me = this;
611
+ me[prop] = value;
612
+ if (this.propChanged !== undefined)
613
+ this.propChanged();
614
+ }
615
+ toStringArquivo() {
616
+ const ini = this.inicial;
617
+ const fim = this.final;
618
+ if (this.modo === SearchMode.Mensal)
619
+ return this.ano + "_" + this.mes;
620
+ if (this.modo === SearchMode.Anual)
621
+ return "" + this.ano;
622
+ if (this.modo === SearchMode.Diario)
623
+ return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}`;
624
+ return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}_ate_${fim.getDate()}_${fim.getMonth() + 1}_${fim.getFullYear()}`;
625
+ }
626
+ getDatasTexto(short = false) {
627
+ const ini = this.inicial;
628
+ const fim = this.final;
629
+ if (this.modo === SearchMode.Mensal && short)
630
+ return this._mesesShort[this.mes - 1] + " DE " + this.ano;
631
+ if (this.modo === SearchMode.Mensal)
632
+ return this._meses[this.mes - 1] + " DE " + this.ano;
633
+ if (this.modo === SearchMode.Anual)
634
+ return "" + this.ano;
635
+ if (this.modo === SearchMode.Diario)
636
+ return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()}`;
637
+ return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()} ATÉ ${fim.getDate()}/${fim.getMonth() + 1}/${fim.getFullYear()}`;
638
+ }
639
+ goNextMonth() {
640
+ this.mes++;
641
+ if (this.mes > 12) {
642
+ this.mes = 1;
643
+ this.ano += 1;
644
+ }
645
+ }
646
+ goBackMonth() {
647
+ this.mes--;
648
+ if (this.mes < 1) {
649
+ this.mes = 12;
650
+ this.ano -= 1;
651
+ }
652
+ }
653
+ }
654
+ var SearchMode;
655
+ (function (SearchMode) {
656
+ SearchMode[SearchMode["Mensal"] = 0] = "Mensal";
657
+ SearchMode[SearchMode["Anual"] = 1] = "Anual";
658
+ SearchMode[SearchMode["Periodo"] = 2] = "Periodo";
659
+ SearchMode[SearchMode["Diario"] = 3] = "Diario";
660
+ })(SearchMode || (SearchMode = {}));
661
+
662
+ class AuthDataService {
663
+ constructor() {
664
+ this.isLoggedIn = false;
665
+ this.token = '';
666
+ this.sensoresDef = { energizacao: false, garagem: false, portaCliente: false, portaServico: false };
667
+ this.permissoes = {
668
+ gerencialCaixasAgrupadoMensal: false,
669
+ financasLogin: false,
670
+ financasDespesaAdd: false,
671
+ financasDespesaUltimosCadastros: false,
672
+ financasDespesaPesquisar: false,
673
+ financasDespesaDelete: false,
674
+ financasDespesaEditar: false,
675
+ financasReceitaAdd: false,
676
+ financasReceitaUltimosCadastros: false,
677
+ financasReceitaPesquisar: false,
678
+ financasReceitaDelete: false,
679
+ financasReceitaEditar: false,
680
+ financasClientePesquisa: false,
681
+ financasClienteAdd: false,
682
+ financasClienteDelete: false,
683
+ financasFornecedorPesquisa: false,
684
+ financasFornecedorAdd: false,
685
+ financasFornecedorDelete: false,
686
+ financasMarcadorPesquisa: false,
687
+ financasMarcadorAdd: false,
688
+ financasMarcadorDelete: false,
689
+ financasDespesaGrupoPesquisa: false,
690
+ financasDespesaGrupoAdd: false,
691
+ financasDespesaGrupoDelete: false,
692
+ financasReceitaGrupoPesquisa: false,
693
+ financasReceitaGrupoAdd: false,
694
+ financasReceitaGrupoDelete: false,
695
+ financasContaPesquisa: false,
696
+ financasContaAdd: false,
697
+ financasContaDelete: false,
698
+ financasExtrato: false,
699
+ financasContaAjuste: false,
700
+ financasGradeAnualDespesa: false,
701
+ financasGradeAnualReceita: false,
702
+ financasMensal: false,
703
+ financasConfiguracoes: false,
704
+ recepcaoEnergizar: false,
705
+ recepcaoConfiguracoes: false,
706
+ recepcaoTrocaOperador: false,
707
+ recepcaoCancelarOcupacao: false,
708
+ recepcaoAcrescimo: false,
709
+ recepcaoDesconto: false,
710
+ recepcaoLimpeza: false,
711
+ recepcaoAtrasarHora: false,
712
+ gerencialLogin: false,
713
+ gerencialPrincipal: false,
714
+ gerencialPrincipalCaixa: false,
715
+ gerencialPrincipalInfo: false,
716
+ gerencialPrincipalQuantidadeOcupacoesDia: false,
717
+ gerencialDiario: false,
718
+ gerencialMensal: false,
719
+ gerencialResumoMensal: false,
720
+ gerencialPorFormaPagamento: false,
721
+ gerencialMediaTempoOcupacao: false,
722
+ gerencialPorOcupacao: false,
723
+ gerencialOcupacoesCanceladas: false,
724
+ gerencialAgrupado: false,
725
+ gerencialPorTurno: false,
726
+ gerencialConsumoFuncionarios: false,
727
+ gerencialConsumoProdutos: false,
728
+ gerencialImagensrecepcao: false,
729
+ gerencialCaixas: false,
730
+ gerencialVerificacaoCaixa: false,
731
+ gerencialComandasPorCaixa: false,
732
+ gerencialRegistrorecepcao: false,
733
+ gerencialAgrupadoDia: false,
734
+ gerencialLogUsuarios: false,
735
+ gerencialPesquisaOcupacoes: false,
736
+ gerencialDescontos: false,
737
+ gerencialGraficoMensal: false,
738
+ gerencialGraficoDiaSemana: false,
739
+ gerencialGraficoAnual: false,
740
+ gerencialGraficoSituacaoSuite: false,
741
+ gerencialOcupacoesHoraClasse: false,
742
+ gerencialLimpezasStatus: false,
743
+ gerencialVendasPorRecepcionistas: false,
744
+ estoqueLogin: false,
745
+ estoqueListaCompras: false,
746
+ estoqueListaProdutoGrupo: false,
747
+ estoqueMovimento: false,
748
+ estoqueSaldoProdutos: false,
749
+ estoqueNotaEntradaAdd: false,
750
+ estoqueNotaEntradaDelete: false,
751
+ estoqueNotaSaidaAdd: false,
752
+ estoqueNotaSaidaDelete: false,
753
+ estoqueAjusteAdd: false,
754
+ estoqueAjusteDelete: false,
755
+ estoqueTrocaSetorAdd: false,
756
+ estoqueTrocaSetorDelete: false,
757
+ estoqueFornecedorPesquisa: false,
758
+ estoqueFornecedorAdd: false,
759
+ estoqueFornecedorDelete: false,
760
+ estoqueClientePesquisa: false,
761
+ estoqueClienteAdd: false,
762
+ estoqueClienteDelete: false,
763
+ estoqueSetorPesquisa: false,
764
+ estoqueSetorAdd: false,
765
+ estoqueSetorDelete: false,
766
+ estoqueProdutoPesquisa: false,
767
+ estoqueProdutoAdd: false,
768
+ estoqueProdutoDelete: false,
769
+ estoqueProdutoGrupoPesquisa: false,
770
+ estoqueProdutoGrupoAdd: false,
771
+ estoqueProdutoGrupoDelete: false,
772
+ estoqueConfiguracao: false,
773
+ adminLogin: false,
774
+ adminProdutoPesquisa: false,
775
+ adminProdutoAdd: false,
776
+ adminProdutoDelete: false,
777
+ adminProdutoGrupoPesquisa: false,
778
+ adminProdutoGrupoAdd: false,
779
+ adminProdutoGrupoDelete: false,
780
+ adminSuitePesquisa: false,
781
+ adminSuiteAdd: false,
782
+ adminSuiteDelete: false,
783
+ adminSuiteClassePesquisa: false,
784
+ adminSuiteClasseAdd: false,
785
+ adminSuiteClasseDelete: false,
786
+ adminOperadorPesquisa: false,
787
+ adminOperadorAdd: false,
788
+ adminOperadorDelete: false,
789
+ adminFuncionarioPesquisa: false,
790
+ adminFuncionarioAdd: false,
791
+ adminFuncionarioDelete: false,
792
+ adminUsuariosPesquisa: false,
793
+ adminUsuariosAdd: false,
794
+ adminUsuariosDelete: false,
795
+ adminPrecos: false,
796
+ adminPatrimonios: false,
797
+ adminDefinicoesGerais: false,
798
+ adminEditarComanda: false,
799
+ adminCortesiaVale: false,
800
+ adminClienteFidelidade: false,
801
+ adminConfiguracoes: false,
802
+ adminPesquisaSatisfacao: false,
803
+ onGerencialLogin: false,
804
+ onGerencialPrincipal: false,
805
+ onGerencialDiario: false,
806
+ onGerencialMensal: false,
807
+ onGerencialPorFormaPagamento: false,
808
+ onGerencialMediaTempoOcupacao: false,
809
+ onGerencialPorOcupacao: false,
810
+ onGerencialOcupacoesCanceladas: false,
811
+ onGerencialAgrupadoDia: false,
812
+ onGerencialPorTurno: false,
813
+ onGerencialConsumoFuncionarios: false,
814
+ onGerencialConsumoProdutos: false,
815
+ onGerencialImagensRecepcao: false,
816
+ onGerencialCaixas: false,
817
+ onGerencialComandasPorCaixa: false,
818
+ onGerencialRegistroRecepcao: false,
819
+ onGerencialGraficoMensal: false,
820
+ onGerencialGraficoDiaSemana: false,
821
+ onGerencialGraficoAnual: false,
822
+ onGerencialGraficoSituacaoSuite: false,
823
+ onGerencialOcupacoesHoraClasse: false,
824
+ onadminLogin: false,
825
+ onadminProdutoPesquisa: false,
826
+ onadminProdutoAdd: false,
827
+ onadminProdutoDelete: false,
828
+ onadminProdutoGrupoPesquisa: false,
829
+ onadminProdutoGrupoAdd: false,
830
+ onadminProdutoGrupoDelete: false,
831
+ onadminSuitePesquisa: false,
832
+ onadminSuiteAdd: false,
833
+ onadminSuiteDelete: false,
834
+ onadminSuiteClassePesquisa: false,
835
+ onadminSuiteClasseAdd: false,
836
+ onadminSuiteClasseDelete: false,
837
+ onadminUsuariosPesquisa: false,
838
+ onadminUsuariosAdd: false,
839
+ onadminUsuariosDelete: false,
840
+ onadminOperadorPesquisa: false,
841
+ onadminOperadorAdd: false,
842
+ onadminOperadorDelete: false,
843
+ onadminFuncionarioPesquisa: false,
844
+ onadminFuncionarioAdd: false,
845
+ onadminFuncionarioDelete: false,
846
+ onadminPrecos: false,
847
+ onadminDefinicoesGerais: false,
848
+ onadminCortesiaVale: false,
849
+ };
850
+ this.empresaNome = '';
851
+ this.empresaId = 0;
852
+ this.loginNome = '';
853
+ this.userId = 0;
854
+ this.email = '';
855
+ this.nome = '';
856
+ }
857
+ login(result) {
858
+ this.isLoggedIn = true;
859
+ this.token = result.token;
860
+ this.sensoresDef = result.sensoresDef;
861
+ this.permissoes = result.permissoes;
862
+ this.empresaNome = result.empresaNome;
863
+ this.empresaId = result.empresaId;
864
+ this.loginNome = result.login;
865
+ this.userId = result.userId;
866
+ this.nome = result.nome;
867
+ this.email = result.email;
868
+ }
869
+ }
870
+ AuthDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AuthDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
871
+ AuthDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AuthDataService, providedIn: 'root' });
872
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AuthDataService, decorators: [{
873
+ type: Injectable,
874
+ args: [{
875
+ providedIn: 'root'
876
+ }]
877
+ }], ctorParameters: function () { return []; } });
878
+
879
+ class ItemCardComponent {
880
+ constructor() { }
881
+ ngOnInit() {
882
+ }
883
+ }
884
+ 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"] }] });
886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, decorators: [{
887
+ type: Component,
888
+ 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"] }]
889
+ }], ctorParameters: function () { return []; }, propDecorators: { nome: [{
890
+ type: Input
891
+ }], codigo: [{
892
+ type: Input
893
+ }], star: [{
894
+ type: Input
895
+ }], cloud: [{
896
+ type: Input
897
+ }], desativado: [{
898
+ type: Input
899
+ }] } });
900
+
901
+ class FuncionariosComponent {
902
+ constructor(ws, notification, dialog, auth, screenHelper) {
903
+ this.ws = ws;
904
+ this.notification = notification;
905
+ this.dialog = dialog;
906
+ this.screenHelper = screenHelper;
20
907
  this.isBusy = false;
908
+ this.items = [];
909
+ this.selectedItem = null;
910
+ this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
911
+ this.setting = new SearchSetting();
912
+ this.focus = new FocusService();
913
+ this.allowAdd = auth.permissoes.adminFuncionarioAdd;
914
+ this.allowExcluir = auth.permissoes.adminFuncionarioDelete;
915
+ this.mobile = this.screenHelper.isMedium;
916
+ this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
21
917
  }
22
918
  ngOnInit() {
919
+ this.setting.ordem = "nome";
920
+ this.atualiza();
921
+ }
922
+ onSelectItem() {
923
+ if (!this.focus.hasInit()) {
924
+ setTimeout(() => {
925
+ this.focus.registerElementById("form-column");
926
+ this.focus.setFirst();
927
+ }, 500);
928
+ //this._focus.registerElementById("form-column");
929
+ }
930
+ else {
931
+ this.focus.setFirst();
932
+ }
933
+ }
934
+ ngOnDestroy() {
935
+ this.focus.unregisterElementById("form-column");
936
+ }
937
+ atualiza() {
938
+ this.isBusy = true;
939
+ this.ws.buscaFuncionario(this.setting)
940
+ .subscribe(r => {
941
+ this.items = r;
942
+ this.selectedItem = null;
943
+ console.info(r);
944
+ this.isBusy = false;
945
+ }, err => {
946
+ this.isBusy = false;
947
+ this.notification.showHttpError(err);
948
+ });
949
+ }
950
+ excluir() {
951
+ const item = this.selectedItem;
952
+ if (!item)
953
+ return;
954
+ confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do funcionário ${item.nome}?`, () => {
955
+ this.isBusy = true;
956
+ this.ws.deleteFuncionario(item.id)
957
+ .subscribe(r => {
958
+ this.notification.showMsg("O funcionário foi excluído com sucesso.");
959
+ this.items.remove(item);
960
+ this.selectedItem = null;
961
+ this.isBusy = false;
962
+ }, err => {
963
+ this.isBusy = false;
964
+ this.notification.showMsg(err.error);
965
+ });
966
+ });
967
+ }
968
+ novo() {
969
+ let height = (window.innerHeight * 0.90) + 'px';
970
+ let width = 550 + 'px';
971
+ if (this.mobile) {
972
+ width = (window.innerWidth * 0.99) + 'px';
973
+ //height = (window.innerHeight * 0.98) + 'px';
974
+ }
975
+ const dialog = this.dialog.open(FuncionarioAddDialogComponent, {
976
+ width: width,
977
+ //height: height,
978
+ maxWidth: '100%',
979
+ panelClass: 'dialog-p0',
980
+ });
981
+ dialog.afterClosed().subscribe(result => {
982
+ if (result === undefined)
983
+ return;
984
+ this.notification.showMsg("Salvo com sucesso.");
985
+ this.atualiza();
986
+ });
987
+ }
988
+ abreCadastro(item) {
989
+ let height = undefined;
990
+ let width = 550 + 'px';
991
+ if (this.mobile) {
992
+ width = (window.innerWidth * 0.99) + 'px';
993
+ height = (window.innerHeight * 0.99) + 'px';
994
+ }
995
+ const dialog = this.dialog.open(FuncionarioEditDialogComponent, {
996
+ data: item,
997
+ width: width,
998
+ //height: height,
999
+ maxWidth: '100%',
1000
+ panelClass: 'dialog-p0',
1001
+ });
1002
+ dialog.afterClosed().subscribe(result => {
1003
+ if (result !== true)
1004
+ return;
1005
+ this.notification.showMsg("Salvo com sucesso.");
1006
+ this.atualiza();
1007
+ });
1008
+ }
1009
+ salvar() {
1010
+ const item = this.selectedItem;
1011
+ if (!item)
1012
+ return;
1013
+ const valMsg = valida(item, this.focus);
1014
+ if (valMsg) {
1015
+ this.notification.showMsgError(valMsg);
1016
+ return;
1017
+ }
1018
+ this.isBusy = true;
1019
+ this.ws.saveFuncionario(item)
1020
+ .subscribe(r => {
1021
+ this.notification.showMsg("Salvo com sucesso.");
1022
+ this.isBusy = false;
1023
+ }, err => {
1024
+ this.isBusy = false;
1025
+ this.notification.showMsg(err.error);
1026
+ });
23
1027
  }
24
1028
  }
25
- BusyIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26
- 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BusyIndicatorComponent, decorators: [{
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] });
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, decorators: [{
28
1032
  type: Component,
29
- 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"] }]
30
- }], ctorParameters: function () { return []; }, propDecorators: { isBusy: [{
31
- type: Input
32
- }] } });
1033
+ 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 }]; } });
33
1035
 
34
1036
  class CheckButtonComponent {
35
1037
  constructor() {
@@ -115,7 +1117,7 @@ class ImageViewerComponent {
115
1117
  }
116
1118
  }
117
1119
  ImageViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
- 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.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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
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"] }] });
119
1121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, decorators: [{
120
1122
  type: Component,
121
1123
  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"] }]
@@ -233,7 +1235,7 @@ class MonthYearPickerComponent {
233
1235
  }
234
1236
  }
235
1237
  MonthYearPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
236
- 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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
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"] }] });
237
1239
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, decorators: [{
238
1240
  type: Component,
239
1241
  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"] }]
@@ -334,7 +1336,7 @@ class NumericPickerComponent {
334
1336
  }
335
1337
  }
336
1338
  NumericPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
337
- 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: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
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"] }] });
338
1340
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
339
1341
  type: Component,
340
1342
  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"] }]
@@ -398,7 +1400,7 @@ class PaginatorComponent {
398
1400
  }
399
1401
  }
400
1402
  PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
401
- 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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
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"] }] });
402
1404
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
403
1405
  type: Component,
404
1406
  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"] }]
@@ -440,7 +1442,7 @@ class RadioButtonGroupComponent {
440
1442
  }
441
1443
  }
442
1444
  RadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
443
- 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
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"] }] });
444
1446
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
445
1447
  type: Component,
446
1448
  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"] }]
@@ -452,46 +1454,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
452
1454
  type: Input
453
1455
  }] } });
454
1456
 
455
- class ItemCardComponent {
456
- constructor() { }
457
- ngOnInit() {
458
- }
459
- }
460
- ItemCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
461
- 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, decorators: [{
463
- type: Component,
464
- 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"] }]
465
- }], ctorParameters: function () { return []; }, propDecorators: { nome: [{
466
- type: Input
467
- }], codigo: [{
468
- type: Input
469
- }], star: [{
470
- type: Input
471
- }], cloud: [{
472
- type: Input
473
- }], desativado: [{
474
- type: Input
475
- }] } });
476
-
477
- class AlertDialogComponent {
478
- constructor(dialogRef, args) {
479
- this.dialogRef = dialogRef;
480
- this.args = args;
481
- }
482
- ngOnInit() {
483
- }
484
- }
485
- AlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
486
- 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: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, decorators: [{
488
- type: Component,
489
- 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>" }]
490
- }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
491
- type: Inject,
492
- args: [MAT_DIALOG_DATA]
493
- }] }]; } });
494
-
495
1457
  class SafeHtmlPipe {
496
1458
  constructor(sanitizer) {
497
1459
  this.sanitizer = sanitizer;
@@ -509,6 +1471,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
509
1471
  }]
510
1472
  }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
511
1473
 
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
+ };
512
1481
  Array.prototype.firstOrNull = function () {
513
1482
  if (this.length > 0)
514
1483
  return this[0];
@@ -531,12 +1500,17 @@ OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
531
1500
  RadioButtonGroupComponent,
532
1501
  ItemCardComponent,
533
1502
  SafeHtmlPipe,
534
- AlertDialogComponent], imports: [BrowserModule,
1503
+ AlertDialogComponent,
1504
+ FuncionariosComponent,
1505
+ FuncionarioFormComponent,
1506
+ FuncionarioEditDialogComponent,
1507
+ FuncionarioAddDialogComponent], imports: [BrowserModule,
535
1508
  BrowserAnimationsModule,
536
1509
  FormsModule,
537
1510
  MatButtonModule,
538
1511
  MatIconModule,
539
- MatDialogModule], exports: [BusyIndicatorComponent,
1512
+ MatDialogModule,
1513
+ MatSelectModule], exports: [BusyIndicatorComponent,
540
1514
  MonthYearPickerComponent,
541
1515
  ImageViewerComponent,
542
1516
  NumericPickerComponent,
@@ -550,7 +1524,8 @@ OxpiNglibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
550
1524
  FormsModule,
551
1525
  MatButtonModule,
552
1526
  MatIconModule,
553
- MatDialogModule] });
1527
+ MatDialogModule,
1528
+ MatSelectModule] });
554
1529
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, decorators: [{
555
1530
  type: NgModule,
556
1531
  args: [{
@@ -564,7 +1539,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
564
1539
  RadioButtonGroupComponent,
565
1540
  ItemCardComponent,
566
1541
  SafeHtmlPipe,
567
- AlertDialogComponent
1542
+ AlertDialogComponent,
1543
+ FuncionariosComponent,
1544
+ FuncionarioFormComponent,
1545
+ FuncionarioEditDialogComponent,
1546
+ FuncionarioAddDialogComponent
568
1547
  ],
569
1548
  imports: [
570
1549
  BrowserModule,
@@ -573,6 +1552,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
573
1552
  MatButtonModule,
574
1553
  MatIconModule,
575
1554
  MatDialogModule,
1555
+ MatSelectModule,
576
1556
  ],
577
1557
  exports: [
578
1558
  BusyIndicatorComponent,
@@ -606,19 +1586,6 @@ class BusyState {
606
1586
  }
607
1587
  }
608
1588
 
609
- class LazyTrigger {
610
- constructor(doFunc, timeout = 800) {
611
- this.doFunc = doFunc;
612
- this.timeout = timeout;
613
- }
614
- fire() {
615
- console.debug("lazyTimeoutId");
616
- if (this.lazyTimeoutId != undefined)
617
- clearTimeout(this.lazyTimeoutId);
618
- this.lazyTimeoutId = window.setTimeout(() => { this.doFunc(); }, this.timeout);
619
- }
620
- }
621
-
622
1589
  class NumberParser {
623
1590
  constructor(setPropFunc, getPropFunc, min, max, triggerMilliseconds = 1500) {
624
1591
  this.setPropFunc = setPropFunc;
@@ -659,213 +1626,62 @@ class NumberParser {
659
1626
  continue;
660
1627
  toParseTxt = toParseTxt.concat(c);
661
1628
  }
662
- }
663
- else {
664
- toParseTxt = vlrTxt;
665
- }
666
- const vlr = parseFloat(toParseTxt);
667
- if (isNaN(vlr) || !this.validaMinMax(vlr)) {
668
- const original = this.getPropFunc();
669
- this.setPropFunc(0);
670
- setTimeout(() => this.setPropFunc(original));
671
- }
672
- else {
673
- this.setPropFunc(vlr);
674
- }
675
- }
676
- validaMinMax(value) {
677
- if ((this.min === undefined) && this.max === undefined)
678
- return true;
679
- if (!(this.min === undefined) && value < this.min)
680
- return false;
681
- if (!(this.max === undefined) && value > this.max)
682
- return false;
683
- return true;
684
- }
685
- }
686
-
687
- class Ordem {
688
- constructor(ordens, isCrescente, onToggle) {
689
- const d = ordens.filter(x => x.default === true).firstOrNull();
690
- this.colName = d === null ? ordens[0].value : d.value;
691
- this.isCrescente = isCrescente;
692
- this.onToggle = onToggle;
693
- }
694
- toggle() {
695
- this.isCrescente = !this.isCrescente;
696
- if (this.onToggle !== undefined)
697
- this.onToggle();
698
- }
699
- toString() {
700
- return this.colName + (!this.isCrescente ? " desc" : "");
701
- }
702
- }
703
-
704
- function printTxt(txt) {
705
- 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>';
706
- printHtml(r);
707
- }
708
- function printHtml(r) {
709
- const blob = new Blob([r], { type: 'text/html' });
710
- const url = window.URL.createObjectURL(blob);
711
- const w = window.open(url, '_blank');
712
- if (w != null)
713
- w.print();
714
- }
715
- function selectText(ev) {
716
- ev.target.select();
717
- }
718
-
719
- function valTextEmpty(v) {
720
- return v === null ||
721
- v === undefined ||
722
- v.trim() === '';
723
- }
724
- function valNumberEmpty(v) {
725
- return v === null ||
726
- v === undefined ||
727
- v === 0;
728
- }
729
- function valTextMax(v, max) {
730
- return v.length > max;
731
- }
732
- function valNumberMin(v, min) {
733
- if (v === null || v === undefined)
734
- return true;
735
- return v <= min;
736
- }
737
-
738
- class NavegacaoSelecaoDialogUtil {
739
- constructor(view) {
740
- this.view = view;
741
- }
742
- onKeyDown(event) {
743
- console.info(event.keyCode);
744
- let key = event.keyCode;
745
- const selected = this.view.selectedItem;
746
- const enterKey = 13, keyDown = 40, keyUp = 38;
747
- if (key === enterKey) {
748
- event.cancelBubble = true;
749
- if (selected !== null && selected !== undefined) {
750
- this.view.dialogRef.close(selected);
751
- return;
752
- }
753
- key = keyDown;
754
- }
755
- if (key !== keyDown && key !== keyUp)
756
- return;
757
- let index = this.view.items.indexOf(selected, 0);
758
- if (key === keyDown)
759
- index++;
760
- if (key === keyUp && index > 0)
761
- index--;
762
- if (index > (this.view.items.length - 1))
763
- return;
764
- this.view.selectedItem = this.view.items[index];
765
- }
766
- }
767
- function confirmaExclusao(dialog, msg, continueFunc) {
768
- const args = {
769
- titulo: "Atenção",
770
- msg: msg
771
- };
772
- const dialogRef = dialog.open(AlertDialogComponent, {
773
- data: args
774
- });
775
- dialogRef.afterClosed().subscribe(dialogResult => {
776
- if (dialogResult !== true)
777
- return;
778
- continueFunc();
779
- });
780
- }
781
-
782
- const fadeAnimation = trigger('fade', [
783
- transition(':enter', [
784
- style({ transform: 'translateY(100%)', opacity: 0 }),
785
- animate('250ms', style({ transform: 'translateY(0)', 'opacity': 1 }))
786
- ]),
787
- transition(':leave', [
788
- style({ transform: 'translateY(0)', 'opacity': 1 }),
789
- animate('250ms', style({ transform: 'translateY(100%)', 'opacity': 0 })),
790
- ])
791
- ]);
792
- const menuLateralAnimation = trigger('menuLateral', [
793
- transition(':enter', [
794
- style({ transform: 'translateX(-100%)', opacity: 1 }),
795
- animate('200ms', style({ transform: 'translateX(0)', 'opacity': 1 }))
796
- ]),
797
- transition(':leave', [
798
- style({ 'opacity': 1 }),
799
- animate('200ms', style({ 'opacity': 0 })),
800
- ])
801
- ]);
802
-
803
- class SearchSetting {
804
- constructor(propChanged) {
805
- this.propChanged = propChanged;
806
- this._meses = ["JANEIRO", "FEVEREIRO", "MARÇO", "ABRIL", "MAIO", "JUNHO", "JULHO", "AGOSTO", "SETEMBRO", "OUTUBRO", "NOVEMBRO", "DEZEMBRO"];
807
- this._mesesShort = ["JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ"];
808
- const now = new Date();
809
- const hj = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0);
810
- console.info(hj);
811
- this.modo = SearchMode.Mensal;
812
- this.mes = hj.getMonth() + 1;
813
- this.ano = hj.getFullYear();
814
- this.inicial = hj.addDays(-30);
815
- this.final = hj;
816
- }
817
- set(prop, value) {
818
- const me = this;
819
- me[prop] = value;
820
- if (this.propChanged !== undefined)
821
- this.propChanged();
1629
+ }
1630
+ else {
1631
+ toParseTxt = vlrTxt;
1632
+ }
1633
+ const vlr = parseFloat(toParseTxt);
1634
+ if (isNaN(vlr) || !this.validaMinMax(vlr)) {
1635
+ const original = this.getPropFunc();
1636
+ this.setPropFunc(0);
1637
+ setTimeout(() => this.setPropFunc(original));
1638
+ }
1639
+ else {
1640
+ this.setPropFunc(vlr);
1641
+ }
822
1642
  }
823
- toStringArquivo() {
824
- const ini = this.inicial;
825
- const fim = this.final;
826
- if (this.modo === SearchMode.Mensal)
827
- return this.ano + "_" + this.mes;
828
- if (this.modo === SearchMode.Anual)
829
- return "" + this.ano;
830
- if (this.modo === SearchMode.Diario)
831
- return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}`;
832
- return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}_ate_${fim.getDate()}_${fim.getMonth() + 1}_${fim.getFullYear()}`;
1643
+ validaMinMax(value) {
1644
+ if ((this.min === undefined) && this.max === undefined)
1645
+ return true;
1646
+ if (!(this.min === undefined) && value < this.min)
1647
+ return false;
1648
+ if (!(this.max === undefined) && value > this.max)
1649
+ return false;
1650
+ return true;
833
1651
  }
834
- getDatasTexto(short = false) {
835
- const ini = this.inicial;
836
- const fim = this.final;
837
- if (this.modo === SearchMode.Mensal && short)
838
- return this._mesesShort[this.mes - 1] + " DE " + this.ano;
839
- if (this.modo === SearchMode.Mensal)
840
- return this._meses[this.mes - 1] + " DE " + this.ano;
841
- if (this.modo === SearchMode.Anual)
842
- return "" + this.ano;
843
- if (this.modo === SearchMode.Diario)
844
- return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()}`;
845
- return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()} ATÉ ${fim.getDate()}/${fim.getMonth() + 1}/${fim.getFullYear()}`;
1652
+ }
1653
+
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;
846
1660
  }
847
- goNextMonth() {
848
- this.mes++;
849
- if (this.mes > 12) {
850
- this.mes = 1;
851
- this.ano += 1;
852
- }
1661
+ toggle() {
1662
+ this.isCrescente = !this.isCrescente;
1663
+ if (this.onToggle !== undefined)
1664
+ this.onToggle();
853
1665
  }
854
- goBackMonth() {
855
- this.mes--;
856
- if (this.mes < 1) {
857
- this.mes = 12;
858
- this.ano -= 1;
859
- }
1666
+ toString() {
1667
+ return this.colName + (!this.isCrescente ? " desc" : "");
860
1668
  }
1669
+ }
1670
+
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);
861
1674
  }
862
- var SearchMode;
863
- (function (SearchMode) {
864
- SearchMode[SearchMode["Mensal"] = 0] = "Mensal";
865
- SearchMode[SearchMode["Anual"] = 1] = "Anual";
866
- SearchMode[SearchMode["Periodo"] = 2] = "Periodo";
867
- SearchMode[SearchMode["Diario"] = 3] = "Diario";
868
- })(SearchMode || (SearchMode = {}));
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();
1681
+ }
1682
+ function selectText(ev) {
1683
+ ev.target.select();
1684
+ }
869
1685
 
870
1686
  class PagamentoRecebimentoSearchSetting extends SearchSetting {
871
1687
  constructor() {
@@ -977,76 +1793,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
977
1793
  }]
978
1794
  }], ctorParameters: function () { return []; } });
979
1795
 
980
- class FocusService {
981
- constructor() {
982
- }
983
- hasInit() {
984
- return this._element !== undefined;
985
- }
986
- registerElementById(name) {
987
- this.registerElement(document.getElementById(name));
988
- }
989
- registerElement(element) {
990
- if (element === null || element === undefined)
991
- return;
992
- this._element = element;
993
- //this._items = this.getItems();
994
- console.info(element);
995
- element.addEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
996
- }
997
- registerWindow() {
998
- this._element = null;
999
- //this._items = this.getItems();
1000
- window.addEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
1001
- }
1002
- unregisterElementById(name) {
1003
- this.unregisterElement(document.getElementById(name));
1004
- }
1005
- unregisterElement(element) {
1006
- if (element === null || element === undefined)
1007
- return;
1008
- element.removeEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
1009
- }
1010
- handleKeyboardEvent(event) {
1011
- if (event.keyCode !== 13)
1012
- return;
1013
- if (event.target.nodeName === "BUTTON")
1014
- return;
1015
- const items = this.getItems();
1016
- const index = Array.prototype.indexOf.call(items, event.target);
1017
- const nextIndex = index + 1;
1018
- if (nextIndex > items.length - 1)
1019
- return;
1020
- const i = items[index + 1];
1021
- if (i.tabIndex > -1)
1022
- i.focus();
1023
- event.preventDefault();
1024
- }
1025
- setFirst() {
1026
- const el = this.getItems()[0]; //[0];
1027
- if (el !== undefined)
1028
- el.focus();
1029
- }
1030
- getItems() {
1031
- const query = this._element !== null && this._element !== undefined ?
1032
- this._element.querySelectorAll('input,button, [tabindex]:not([tabindex="-1"])') :
1033
- document.querySelectorAll('input,button, [tabindex]:not([tabindex="-1"])');
1034
- const items = [];
1035
- for (let index = 0; index < query.length; index++) {
1036
- const el = query[index];
1037
- if (el.tabIndex > 0)
1038
- items.push(el);
1039
- }
1040
- return items;
1041
- }
1042
- set(id) {
1043
- const el = document.getElementById(id);
1044
- if (el === null)
1045
- return;
1046
- el.focus();
1047
- }
1048
- }
1049
-
1050
1796
  class Preferences {
1051
1797
  constructor() {
1052
1798
  }
@@ -1087,101 +1833,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
1087
1833
  }]
1088
1834
  }], ctorParameters: function () { return []; } });
1089
1835
 
1090
- const SM_WIDTH = 576;
1091
- const MD_WIDTH = 768;
1092
- const LG_WIDTH = 992;
1093
- const XL_WIDTH = 1200;
1094
- const XXL_WIDTH = 1400;
1095
- class ScreenHelperService {
1096
- constructor() {
1097
- this.changedMobileScreen = new EventEmitter();
1098
- this.changedMediumScreen = new EventEmitter();
1099
- this.changedLargeScreen = new EventEmitter();
1100
- this.changedXLargeScreen = new EventEmitter();
1101
- this.changedXXLargeScreen = new EventEmitter();
1102
- this.changedMinSmallScreen = new EventEmitter();
1103
- this.changedMinMediumScreen = new EventEmitter();
1104
- this.changedMinLargeScreen = new EventEmitter();
1105
- this.changedMinXLargeScreen = new EventEmitter();
1106
- this.changedMinXXLargeScreen = new EventEmitter();
1107
- this.mobileScreen = false;
1108
- this.isMedium = false;
1109
- this.isLarge = false;
1110
- this.isXLarge = false;
1111
- this.isXXLarge = false;
1112
- this.minSmall = false;
1113
- this.minMedium = false;
1114
- this.minLarge = false;
1115
- this.minXLarge = false;
1116
- this.minXXLarge = false;
1117
- this.determinaMobileScreen();
1118
- window.addEventListener('resize', (event) => {
1119
- this.determinaMobileScreen();
1120
- });
1121
- }
1122
- determinaMobileScreen() {
1123
- const width = window.innerWidth;
1124
- const isSmall = width <= SM_WIDTH;
1125
- const isMedium = width <= MD_WIDTH;
1126
- const isLarge = width <= LG_WIDTH;
1127
- const isXLarge = width <= XL_WIDTH;
1128
- const isXXLarge = width <= XXL_WIDTH;
1129
- const minSmall = width >= SM_WIDTH;
1130
- const minMedium = width >= MD_WIDTH;
1131
- const minLarge = width >= LG_WIDTH;
1132
- const minXLarge = width >= XL_WIDTH;
1133
- const minXXLarge = width >= XXL_WIDTH;
1134
- if (isSmall !== this.mobileScreen) {
1135
- this.changedMobileScreen.emit(isSmall);
1136
- this.mobileScreen = isSmall;
1137
- }
1138
- if (isMedium !== this.isMedium) {
1139
- this.changedMediumScreen.emit(isMedium);
1140
- this.isMedium = isMedium;
1141
- }
1142
- if (isLarge !== this.isLarge) {
1143
- this.changedLargeScreen.emit(isLarge);
1144
- this.isLarge = isLarge;
1145
- }
1146
- if (isXLarge !== this.isXLarge) {
1147
- this.changedXLargeScreen.emit(isXLarge);
1148
- this.isXLarge = isXLarge;
1149
- }
1150
- if (isXXLarge !== this.isXXLarge) {
1151
- this.changedXXLargeScreen.emit(isXXLarge);
1152
- this.isXXLarge = isXXLarge;
1153
- }
1154
- if (minSmall !== this.minSmall) {
1155
- this.changedMinSmallScreen.emit(isSmall);
1156
- this.minMedium = isSmall;
1157
- }
1158
- if (minMedium !== this.minMedium) {
1159
- this.changedMinMediumScreen.emit(isMedium);
1160
- this.minMedium = isMedium;
1161
- }
1162
- if (minLarge !== this.minLarge) {
1163
- this.changedMinLargeScreen.emit(minLarge);
1164
- this.minLarge = minLarge;
1165
- }
1166
- if (minXLarge !== this.minXLarge) {
1167
- this.changedMinXLargeScreen.emit(minXLarge);
1168
- this.minXLarge = minXLarge;
1169
- }
1170
- if (minXXLarge !== this.minXXLarge) {
1171
- this.changedMinXXLargeScreen.emit(minXXLarge);
1172
- this.minXXLarge = minXXLarge;
1173
- }
1174
- }
1175
- }
1176
- ScreenHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1177
- ScreenHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, providedIn: 'root' });
1178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, decorators: [{
1179
- type: Injectable,
1180
- args: [{
1181
- providedIn: 'root'
1182
- }]
1183
- }], ctorParameters: function () { return []; } });
1184
-
1185
1836
  /*
1186
1837
  * Public API Surface of oxpi-nglib
1187
1838
  */
@@ -1190,5 +1841,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
1190
1841
  * Generated bundle index. Do not edit.
1191
1842
  */
1192
1843
 
1193
- export { AlertDialogComponent, BusyIndicatorComponent, BusyState, CheckButtonComponent, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, ImageViewerComponent, ItemCardComponent, LazyTrigger, MonthYearPickerComponent, NavegacaoSelecaoDialogUtil, NumberParser, NumericPickerComponent, OcupacaoFilterSetting, OcupacaoSearchDateField, OcupacaoSearchSetting, OcupacaoSearchTipoEntrada, Ordem, OxpiNglibModule, PagamentoRecebimentoSearchSetting, PaginatorComponent, PorOcupacaoTipo, Preferences, ProdutoSearchSetting, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SuitesIntervencoesSetting, confirmaExclusao, fadeAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax };
1844
+ export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FuncionarioAddDialogComponent, FuncionarioEditDialogComponent, FuncionarioFormComponent, FuncionariosComponent, ImageViewerComponent, ItemCardComponent, LazyTrigger, MonthYearPickerComponent, NavegacaoSelecaoDialogUtil, NotificationService, NumberParser, NumericPickerComponent, OcupacaoFilterSetting, OcupacaoSearchDateField, OcupacaoSearchSetting, OcupacaoSearchTipoEntrada, Ordem, OxpiNglibModule, PagamentoRecebimentoSearchSetting, PaginatorComponent, PorOcupacaoTipo, Preferences, ProdutoSearchSetting, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SuitesIntervencoesSetting, confirmaExclusao, fadeAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax };
1194
1845
  //# sourceMappingURL=oxpi-nglib.mjs.map