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.
- package/esm2020/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.mjs +74 -0
- package/esm2020/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.mjs +68 -0
- package/esm2020/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.mjs +38 -0
- package/esm2020/lib/cadastros/funcionarios/funcionarios/funcionarios.component.mjs +157 -0
- package/esm2020/lib/models/entidades/funcionario.mjs +12 -0
- package/esm2020/lib/oxpi-nglib.module.mjs +28 -5
- package/esm2020/lib/providers/auth-data.service.mjs +219 -0
- package/esm2020/lib/providers/common-web-service.mjs +98 -0
- package/esm2020/lib/providers/notification.service.mjs +29 -0
- package/esm2020/public-api.mjs +8 -1
- package/fesm2015/oxpi-nglib.mjs +1102 -447
- package/fesm2015/oxpi-nglib.mjs.map +1 -1
- package/fesm2020/oxpi-nglib.mjs +1096 -445
- package/fesm2020/oxpi-nglib.mjs.map +1 -1
- package/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.d.ts +27 -0
- package/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.d.ts +27 -0
- package/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.d.ts +15 -0
- package/lib/cadastros/funcionarios/funcionarios/funcionarios.component.d.ts +36 -0
- package/lib/models/entidades/funcionario.d.ts +15 -0
- package/lib/oxpi-nglib.module.d.ts +13 -7
- package/lib/providers/auth-data.service.d.ts +20 -0
- package/lib/providers/common-web-service.d.ts +42 -0
- package/lib/providers/notification.service.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
package/fesm2015/oxpi-nglib.mjs
CHANGED
|
@@ -1,35 +1,1043 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input,
|
|
3
|
-
import * as
|
|
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
|
|
12
|
+
import * as i7 from '@angular/material/icon';
|
|
7
13
|
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
-
import * as
|
|
14
|
+
import * as i3 from '@angular/forms';
|
|
9
15
|
import { FormsModule } from '@angular/forms';
|
|
10
|
-
import * as
|
|
11
|
-
import {
|
|
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
|
-
|
|
19
|
-
|
|
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 () {
|
|
441
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
442
|
+
type: Inject,
|
|
443
|
+
args: [MAT_DIALOG_DATA]
|
|
444
|
+
}] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }];
|
|
445
|
+
} });
|
|
446
|
+
|
|
447
|
+
class FuncionarioEditDialogComponent {
|
|
448
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
449
|
+
this.ws = ws;
|
|
450
|
+
this.notification = notification;
|
|
451
|
+
this.dataDialog = dataDialog;
|
|
452
|
+
this.dialog = dialog;
|
|
453
|
+
this.elRef = elRef;
|
|
454
|
+
this.dialogRef = dialogRef;
|
|
455
|
+
this.screenHelper = screenHelper;
|
|
456
|
+
this.isBusy = false;
|
|
457
|
+
this.focus = new FocusService();
|
|
458
|
+
if (dataDialog) {
|
|
459
|
+
this.model = dataDialog;
|
|
460
|
+
}
|
|
461
|
+
this.mobile = this.screenHelper.isMedium;
|
|
462
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
463
|
+
}
|
|
464
|
+
ngOnInit() {
|
|
465
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
466
|
+
}
|
|
467
|
+
ngOnDestroy() {
|
|
468
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
469
|
+
}
|
|
470
|
+
salvar() {
|
|
471
|
+
if (!this.model)
|
|
472
|
+
return;
|
|
473
|
+
const valMsg = valida(this.model, this.focus);
|
|
474
|
+
if (valMsg) {
|
|
475
|
+
this.notification.showMsgError(valMsg);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
this.isBusy = true;
|
|
479
|
+
this.ws.saveFuncionario(this.model)
|
|
480
|
+
.subscribe(r => {
|
|
481
|
+
this.isBusy = false;
|
|
482
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
483
|
+
if (this.dialogRef)
|
|
484
|
+
this.dialogRef.close(true);
|
|
485
|
+
}, err => {
|
|
486
|
+
this.isBusy = false;
|
|
487
|
+
this.notification.showMsg(err.error);
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
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 });
|
|
492
|
+
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"] }] });
|
|
493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionarioEditDialogComponent, decorators: [{
|
|
494
|
+
type: Component,
|
|
495
|
+
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"] }]
|
|
496
|
+
}], ctorParameters: function () {
|
|
497
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
498
|
+
type: Inject,
|
|
499
|
+
args: [MAT_DIALOG_DATA]
|
|
500
|
+
}] }, { type: i3$1.MatDialog }, { type: i0.ElementRef }, { type: i3$1.MatDialogRef }, { type: ScreenHelperService }];
|
|
501
|
+
} });
|
|
502
|
+
|
|
503
|
+
const fadeAnimation = trigger('fade', [
|
|
504
|
+
transition(':enter', [
|
|
505
|
+
style({ transform: 'translateY(100%)', opacity: 0 }),
|
|
506
|
+
animate('250ms', style({ transform: 'translateY(0)', 'opacity': 1 }))
|
|
507
|
+
]),
|
|
508
|
+
transition(':leave', [
|
|
509
|
+
style({ transform: 'translateY(0)', 'opacity': 1 }),
|
|
510
|
+
animate('250ms', style({ transform: 'translateY(100%)', 'opacity': 0 })),
|
|
511
|
+
])
|
|
512
|
+
]);
|
|
513
|
+
const menuLateralAnimation = trigger('menuLateral', [
|
|
514
|
+
transition(':enter', [
|
|
515
|
+
style({ transform: 'translateX(-100%)', opacity: 1 }),
|
|
516
|
+
animate('200ms', style({ transform: 'translateX(0)', 'opacity': 1 }))
|
|
517
|
+
]),
|
|
518
|
+
transition(':leave', [
|
|
519
|
+
style({ 'opacity': 1 }),
|
|
520
|
+
animate('200ms', style({ 'opacity': 0 })),
|
|
521
|
+
])
|
|
522
|
+
]);
|
|
523
|
+
|
|
524
|
+
class LazyTrigger {
|
|
525
|
+
constructor(doFunc, timeout = 800) {
|
|
526
|
+
this.doFunc = doFunc;
|
|
527
|
+
this.timeout = timeout;
|
|
528
|
+
}
|
|
529
|
+
fire() {
|
|
530
|
+
console.debug("lazyTimeoutId");
|
|
531
|
+
if (this.lazyTimeoutId != undefined)
|
|
532
|
+
clearTimeout(this.lazyTimeoutId);
|
|
533
|
+
this.lazyTimeoutId = window.setTimeout(() => { this.doFunc(); }, this.timeout);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
class AlertDialogComponent {
|
|
538
|
+
constructor(dialogRef, args) {
|
|
539
|
+
this.dialogRef = dialogRef;
|
|
540
|
+
this.args = args;
|
|
541
|
+
}
|
|
542
|
+
ngOnInit() {
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
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 });
|
|
546
|
+
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"] }] });
|
|
547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AlertDialogComponent, decorators: [{
|
|
548
|
+
type: Component,
|
|
549
|
+
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>" }]
|
|
550
|
+
}], ctorParameters: function () {
|
|
551
|
+
return [{ type: i3$1.MatDialogRef }, { type: undefined, decorators: [{
|
|
552
|
+
type: Inject,
|
|
553
|
+
args: [MAT_DIALOG_DATA]
|
|
554
|
+
}] }];
|
|
555
|
+
} });
|
|
556
|
+
|
|
557
|
+
class NavegacaoSelecaoDialogUtil {
|
|
558
|
+
constructor(view) {
|
|
559
|
+
this.view = view;
|
|
560
|
+
}
|
|
561
|
+
onKeyDown(event) {
|
|
562
|
+
console.info(event.keyCode);
|
|
563
|
+
let key = event.keyCode;
|
|
564
|
+
const selected = this.view.selectedItem;
|
|
565
|
+
const enterKey = 13, keyDown = 40, keyUp = 38;
|
|
566
|
+
if (key === enterKey) {
|
|
567
|
+
event.cancelBubble = true;
|
|
568
|
+
if (selected !== null && selected !== undefined) {
|
|
569
|
+
this.view.dialogRef.close(selected);
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
key = keyDown;
|
|
573
|
+
}
|
|
574
|
+
if (key !== keyDown && key !== keyUp)
|
|
575
|
+
return;
|
|
576
|
+
let index = this.view.items.indexOf(selected, 0);
|
|
577
|
+
if (key === keyDown)
|
|
578
|
+
index++;
|
|
579
|
+
if (key === keyUp && index > 0)
|
|
580
|
+
index--;
|
|
581
|
+
if (index > (this.view.items.length - 1))
|
|
582
|
+
return;
|
|
583
|
+
this.view.selectedItem = this.view.items[index];
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
function confirmaExclusao(dialog, msg, continueFunc) {
|
|
587
|
+
const args = {
|
|
588
|
+
titulo: "Atenção",
|
|
589
|
+
msg: msg
|
|
590
|
+
};
|
|
591
|
+
const dialogRef = dialog.open(AlertDialogComponent, {
|
|
592
|
+
data: args
|
|
593
|
+
});
|
|
594
|
+
dialogRef.afterClosed().subscribe(dialogResult => {
|
|
595
|
+
if (dialogResult !== true)
|
|
596
|
+
return;
|
|
597
|
+
continueFunc();
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
class SearchSetting {
|
|
602
|
+
constructor(propChanged) {
|
|
603
|
+
this.propChanged = propChanged;
|
|
604
|
+
this._meses = ["JANEIRO", "FEVEREIRO", "MARÇO", "ABRIL", "MAIO", "JUNHO", "JULHO", "AGOSTO", "SETEMBRO", "OUTUBRO", "NOVEMBRO", "DEZEMBRO"];
|
|
605
|
+
this._mesesShort = ["JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ"];
|
|
606
|
+
const now = new Date();
|
|
607
|
+
const hj = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0);
|
|
608
|
+
console.info(hj);
|
|
609
|
+
this.modo = SearchMode.Mensal;
|
|
610
|
+
this.mes = hj.getMonth() + 1;
|
|
611
|
+
this.ano = hj.getFullYear();
|
|
612
|
+
this.inicial = hj.addDays(-30);
|
|
613
|
+
this.final = hj;
|
|
614
|
+
}
|
|
615
|
+
set(prop, value) {
|
|
616
|
+
const me = this;
|
|
617
|
+
me[prop] = value;
|
|
618
|
+
if (this.propChanged !== undefined)
|
|
619
|
+
this.propChanged();
|
|
620
|
+
}
|
|
621
|
+
toStringArquivo() {
|
|
622
|
+
const ini = this.inicial;
|
|
623
|
+
const fim = this.final;
|
|
624
|
+
if (this.modo === SearchMode.Mensal)
|
|
625
|
+
return this.ano + "_" + this.mes;
|
|
626
|
+
if (this.modo === SearchMode.Anual)
|
|
627
|
+
return "" + this.ano;
|
|
628
|
+
if (this.modo === SearchMode.Diario)
|
|
629
|
+
return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}`;
|
|
630
|
+
return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}_ate_${fim.getDate()}_${fim.getMonth() + 1}_${fim.getFullYear()}`;
|
|
631
|
+
}
|
|
632
|
+
getDatasTexto(short = false) {
|
|
633
|
+
const ini = this.inicial;
|
|
634
|
+
const fim = this.final;
|
|
635
|
+
if (this.modo === SearchMode.Mensal && short)
|
|
636
|
+
return this._mesesShort[this.mes - 1] + " DE " + this.ano;
|
|
637
|
+
if (this.modo === SearchMode.Mensal)
|
|
638
|
+
return this._meses[this.mes - 1] + " DE " + this.ano;
|
|
639
|
+
if (this.modo === SearchMode.Anual)
|
|
640
|
+
return "" + this.ano;
|
|
641
|
+
if (this.modo === SearchMode.Diario)
|
|
642
|
+
return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()}`;
|
|
643
|
+
return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()} ATÉ ${fim.getDate()}/${fim.getMonth() + 1}/${fim.getFullYear()}`;
|
|
644
|
+
}
|
|
645
|
+
goNextMonth() {
|
|
646
|
+
this.mes++;
|
|
647
|
+
if (this.mes > 12) {
|
|
648
|
+
this.mes = 1;
|
|
649
|
+
this.ano += 1;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
goBackMonth() {
|
|
653
|
+
this.mes--;
|
|
654
|
+
if (this.mes < 1) {
|
|
655
|
+
this.mes = 12;
|
|
656
|
+
this.ano -= 1;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
var SearchMode;
|
|
661
|
+
(function (SearchMode) {
|
|
662
|
+
SearchMode[SearchMode["Mensal"] = 0] = "Mensal";
|
|
663
|
+
SearchMode[SearchMode["Anual"] = 1] = "Anual";
|
|
664
|
+
SearchMode[SearchMode["Periodo"] = 2] = "Periodo";
|
|
665
|
+
SearchMode[SearchMode["Diario"] = 3] = "Diario";
|
|
666
|
+
})(SearchMode || (SearchMode = {}));
|
|
667
|
+
|
|
668
|
+
class AuthDataService {
|
|
669
|
+
constructor() {
|
|
670
|
+
this.isLoggedIn = false;
|
|
671
|
+
this.token = '';
|
|
672
|
+
this.sensoresDef = { energizacao: false, garagem: false, portaCliente: false, portaServico: false };
|
|
673
|
+
this.permissoes = {
|
|
674
|
+
gerencialCaixasAgrupadoMensal: false,
|
|
675
|
+
financasLogin: false,
|
|
676
|
+
financasDespesaAdd: false,
|
|
677
|
+
financasDespesaUltimosCadastros: false,
|
|
678
|
+
financasDespesaPesquisar: false,
|
|
679
|
+
financasDespesaDelete: false,
|
|
680
|
+
financasDespesaEditar: false,
|
|
681
|
+
financasReceitaAdd: false,
|
|
682
|
+
financasReceitaUltimosCadastros: false,
|
|
683
|
+
financasReceitaPesquisar: false,
|
|
684
|
+
financasReceitaDelete: false,
|
|
685
|
+
financasReceitaEditar: false,
|
|
686
|
+
financasClientePesquisa: false,
|
|
687
|
+
financasClienteAdd: false,
|
|
688
|
+
financasClienteDelete: false,
|
|
689
|
+
financasFornecedorPesquisa: false,
|
|
690
|
+
financasFornecedorAdd: false,
|
|
691
|
+
financasFornecedorDelete: false,
|
|
692
|
+
financasMarcadorPesquisa: false,
|
|
693
|
+
financasMarcadorAdd: false,
|
|
694
|
+
financasMarcadorDelete: false,
|
|
695
|
+
financasDespesaGrupoPesquisa: false,
|
|
696
|
+
financasDespesaGrupoAdd: false,
|
|
697
|
+
financasDespesaGrupoDelete: false,
|
|
698
|
+
financasReceitaGrupoPesquisa: false,
|
|
699
|
+
financasReceitaGrupoAdd: false,
|
|
700
|
+
financasReceitaGrupoDelete: false,
|
|
701
|
+
financasContaPesquisa: false,
|
|
702
|
+
financasContaAdd: false,
|
|
703
|
+
financasContaDelete: false,
|
|
704
|
+
financasExtrato: false,
|
|
705
|
+
financasContaAjuste: false,
|
|
706
|
+
financasGradeAnualDespesa: false,
|
|
707
|
+
financasGradeAnualReceita: false,
|
|
708
|
+
financasMensal: false,
|
|
709
|
+
financasConfiguracoes: false,
|
|
710
|
+
recepcaoEnergizar: false,
|
|
711
|
+
recepcaoConfiguracoes: false,
|
|
712
|
+
recepcaoTrocaOperador: false,
|
|
713
|
+
recepcaoCancelarOcupacao: false,
|
|
714
|
+
recepcaoAcrescimo: false,
|
|
715
|
+
recepcaoDesconto: false,
|
|
716
|
+
recepcaoLimpeza: false,
|
|
717
|
+
recepcaoAtrasarHora: false,
|
|
718
|
+
gerencialLogin: false,
|
|
719
|
+
gerencialPrincipal: false,
|
|
720
|
+
gerencialPrincipalCaixa: false,
|
|
721
|
+
gerencialPrincipalInfo: false,
|
|
722
|
+
gerencialPrincipalQuantidadeOcupacoesDia: false,
|
|
723
|
+
gerencialDiario: false,
|
|
724
|
+
gerencialMensal: false,
|
|
725
|
+
gerencialResumoMensal: false,
|
|
726
|
+
gerencialPorFormaPagamento: false,
|
|
727
|
+
gerencialMediaTempoOcupacao: false,
|
|
728
|
+
gerencialPorOcupacao: false,
|
|
729
|
+
gerencialOcupacoesCanceladas: false,
|
|
730
|
+
gerencialAgrupado: false,
|
|
731
|
+
gerencialPorTurno: false,
|
|
732
|
+
gerencialConsumoFuncionarios: false,
|
|
733
|
+
gerencialConsumoProdutos: false,
|
|
734
|
+
gerencialImagensrecepcao: false,
|
|
735
|
+
gerencialCaixas: false,
|
|
736
|
+
gerencialVerificacaoCaixa: false,
|
|
737
|
+
gerencialComandasPorCaixa: false,
|
|
738
|
+
gerencialRegistrorecepcao: false,
|
|
739
|
+
gerencialAgrupadoDia: false,
|
|
740
|
+
gerencialLogUsuarios: false,
|
|
741
|
+
gerencialPesquisaOcupacoes: false,
|
|
742
|
+
gerencialDescontos: false,
|
|
743
|
+
gerencialGraficoMensal: false,
|
|
744
|
+
gerencialGraficoDiaSemana: false,
|
|
745
|
+
gerencialGraficoAnual: false,
|
|
746
|
+
gerencialGraficoSituacaoSuite: false,
|
|
747
|
+
gerencialOcupacoesHoraClasse: false,
|
|
748
|
+
gerencialLimpezasStatus: false,
|
|
749
|
+
gerencialVendasPorRecepcionistas: false,
|
|
750
|
+
estoqueLogin: false,
|
|
751
|
+
estoqueListaCompras: false,
|
|
752
|
+
estoqueListaProdutoGrupo: false,
|
|
753
|
+
estoqueMovimento: false,
|
|
754
|
+
estoqueSaldoProdutos: false,
|
|
755
|
+
estoqueNotaEntradaAdd: false,
|
|
756
|
+
estoqueNotaEntradaDelete: false,
|
|
757
|
+
estoqueNotaSaidaAdd: false,
|
|
758
|
+
estoqueNotaSaidaDelete: false,
|
|
759
|
+
estoqueAjusteAdd: false,
|
|
760
|
+
estoqueAjusteDelete: false,
|
|
761
|
+
estoqueTrocaSetorAdd: false,
|
|
762
|
+
estoqueTrocaSetorDelete: false,
|
|
763
|
+
estoqueFornecedorPesquisa: false,
|
|
764
|
+
estoqueFornecedorAdd: false,
|
|
765
|
+
estoqueFornecedorDelete: false,
|
|
766
|
+
estoqueClientePesquisa: false,
|
|
767
|
+
estoqueClienteAdd: false,
|
|
768
|
+
estoqueClienteDelete: false,
|
|
769
|
+
estoqueSetorPesquisa: false,
|
|
770
|
+
estoqueSetorAdd: false,
|
|
771
|
+
estoqueSetorDelete: false,
|
|
772
|
+
estoqueProdutoPesquisa: false,
|
|
773
|
+
estoqueProdutoAdd: false,
|
|
774
|
+
estoqueProdutoDelete: false,
|
|
775
|
+
estoqueProdutoGrupoPesquisa: false,
|
|
776
|
+
estoqueProdutoGrupoAdd: false,
|
|
777
|
+
estoqueProdutoGrupoDelete: false,
|
|
778
|
+
estoqueConfiguracao: false,
|
|
779
|
+
adminLogin: false,
|
|
780
|
+
adminProdutoPesquisa: false,
|
|
781
|
+
adminProdutoAdd: false,
|
|
782
|
+
adminProdutoDelete: false,
|
|
783
|
+
adminProdutoGrupoPesquisa: false,
|
|
784
|
+
adminProdutoGrupoAdd: false,
|
|
785
|
+
adminProdutoGrupoDelete: false,
|
|
786
|
+
adminSuitePesquisa: false,
|
|
787
|
+
adminSuiteAdd: false,
|
|
788
|
+
adminSuiteDelete: false,
|
|
789
|
+
adminSuiteClassePesquisa: false,
|
|
790
|
+
adminSuiteClasseAdd: false,
|
|
791
|
+
adminSuiteClasseDelete: false,
|
|
792
|
+
adminOperadorPesquisa: false,
|
|
793
|
+
adminOperadorAdd: false,
|
|
794
|
+
adminOperadorDelete: false,
|
|
795
|
+
adminFuncionarioPesquisa: false,
|
|
796
|
+
adminFuncionarioAdd: false,
|
|
797
|
+
adminFuncionarioDelete: false,
|
|
798
|
+
adminUsuariosPesquisa: false,
|
|
799
|
+
adminUsuariosAdd: false,
|
|
800
|
+
adminUsuariosDelete: false,
|
|
801
|
+
adminPrecos: false,
|
|
802
|
+
adminPatrimonios: false,
|
|
803
|
+
adminDefinicoesGerais: false,
|
|
804
|
+
adminEditarComanda: false,
|
|
805
|
+
adminCortesiaVale: false,
|
|
806
|
+
adminClienteFidelidade: false,
|
|
807
|
+
adminConfiguracoes: false,
|
|
808
|
+
adminPesquisaSatisfacao: false,
|
|
809
|
+
onGerencialLogin: false,
|
|
810
|
+
onGerencialPrincipal: false,
|
|
811
|
+
onGerencialDiario: false,
|
|
812
|
+
onGerencialMensal: false,
|
|
813
|
+
onGerencialPorFormaPagamento: false,
|
|
814
|
+
onGerencialMediaTempoOcupacao: false,
|
|
815
|
+
onGerencialPorOcupacao: false,
|
|
816
|
+
onGerencialOcupacoesCanceladas: false,
|
|
817
|
+
onGerencialAgrupadoDia: false,
|
|
818
|
+
onGerencialPorTurno: false,
|
|
819
|
+
onGerencialConsumoFuncionarios: false,
|
|
820
|
+
onGerencialConsumoProdutos: false,
|
|
821
|
+
onGerencialImagensRecepcao: false,
|
|
822
|
+
onGerencialCaixas: false,
|
|
823
|
+
onGerencialComandasPorCaixa: false,
|
|
824
|
+
onGerencialRegistroRecepcao: false,
|
|
825
|
+
onGerencialGraficoMensal: false,
|
|
826
|
+
onGerencialGraficoDiaSemana: false,
|
|
827
|
+
onGerencialGraficoAnual: false,
|
|
828
|
+
onGerencialGraficoSituacaoSuite: false,
|
|
829
|
+
onGerencialOcupacoesHoraClasse: false,
|
|
830
|
+
onadminLogin: false,
|
|
831
|
+
onadminProdutoPesquisa: false,
|
|
832
|
+
onadminProdutoAdd: false,
|
|
833
|
+
onadminProdutoDelete: false,
|
|
834
|
+
onadminProdutoGrupoPesquisa: false,
|
|
835
|
+
onadminProdutoGrupoAdd: false,
|
|
836
|
+
onadminProdutoGrupoDelete: false,
|
|
837
|
+
onadminSuitePesquisa: false,
|
|
838
|
+
onadminSuiteAdd: false,
|
|
839
|
+
onadminSuiteDelete: false,
|
|
840
|
+
onadminSuiteClassePesquisa: false,
|
|
841
|
+
onadminSuiteClasseAdd: false,
|
|
842
|
+
onadminSuiteClasseDelete: false,
|
|
843
|
+
onadminUsuariosPesquisa: false,
|
|
844
|
+
onadminUsuariosAdd: false,
|
|
845
|
+
onadminUsuariosDelete: false,
|
|
846
|
+
onadminOperadorPesquisa: false,
|
|
847
|
+
onadminOperadorAdd: false,
|
|
848
|
+
onadminOperadorDelete: false,
|
|
849
|
+
onadminFuncionarioPesquisa: false,
|
|
850
|
+
onadminFuncionarioAdd: false,
|
|
851
|
+
onadminFuncionarioDelete: false,
|
|
852
|
+
onadminPrecos: false,
|
|
853
|
+
onadminDefinicoesGerais: false,
|
|
854
|
+
onadminCortesiaVale: false,
|
|
855
|
+
};
|
|
856
|
+
this.empresaNome = '';
|
|
857
|
+
this.empresaId = 0;
|
|
858
|
+
this.loginNome = '';
|
|
859
|
+
this.userId = 0;
|
|
860
|
+
this.email = '';
|
|
861
|
+
this.nome = '';
|
|
862
|
+
}
|
|
863
|
+
login(result) {
|
|
864
|
+
this.isLoggedIn = true;
|
|
865
|
+
this.token = result.token;
|
|
866
|
+
this.sensoresDef = result.sensoresDef;
|
|
867
|
+
this.permissoes = result.permissoes;
|
|
868
|
+
this.empresaNome = result.empresaNome;
|
|
869
|
+
this.empresaId = result.empresaId;
|
|
870
|
+
this.loginNome = result.login;
|
|
871
|
+
this.userId = result.userId;
|
|
872
|
+
this.nome = result.nome;
|
|
873
|
+
this.email = result.email;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
AuthDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AuthDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
877
|
+
AuthDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AuthDataService, providedIn: 'root' });
|
|
878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AuthDataService, decorators: [{
|
|
879
|
+
type: Injectable,
|
|
880
|
+
args: [{
|
|
881
|
+
providedIn: 'root'
|
|
882
|
+
}]
|
|
883
|
+
}], ctorParameters: function () { return []; } });
|
|
884
|
+
|
|
885
|
+
class ItemCardComponent {
|
|
886
|
+
constructor() { }
|
|
887
|
+
ngOnInit() {
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
ItemCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
891
|
+
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"] }] });
|
|
892
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemCardComponent, decorators: [{
|
|
893
|
+
type: Component,
|
|
894
|
+
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"] }]
|
|
895
|
+
}], ctorParameters: function () { return []; }, propDecorators: { nome: [{
|
|
896
|
+
type: Input
|
|
897
|
+
}], codigo: [{
|
|
898
|
+
type: Input
|
|
899
|
+
}], star: [{
|
|
900
|
+
type: Input
|
|
901
|
+
}], cloud: [{
|
|
902
|
+
type: Input
|
|
903
|
+
}], desativado: [{
|
|
904
|
+
type: Input
|
|
905
|
+
}] } });
|
|
906
|
+
|
|
907
|
+
class FuncionariosComponent {
|
|
908
|
+
constructor(ws, notification, dialog, auth, screenHelper) {
|
|
909
|
+
this.ws = ws;
|
|
910
|
+
this.notification = notification;
|
|
911
|
+
this.dialog = dialog;
|
|
912
|
+
this.screenHelper = screenHelper;
|
|
20
913
|
this.isBusy = false;
|
|
914
|
+
this.items = [];
|
|
915
|
+
this.selectedItem = null;
|
|
916
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
917
|
+
this.setting = new SearchSetting();
|
|
918
|
+
this.focus = new FocusService();
|
|
919
|
+
this.allowAdd = auth.permissoes.adminFuncionarioAdd;
|
|
920
|
+
this.allowExcluir = auth.permissoes.adminFuncionarioDelete;
|
|
921
|
+
this.mobile = this.screenHelper.isMedium;
|
|
922
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
21
923
|
}
|
|
22
924
|
ngOnInit() {
|
|
925
|
+
this.setting.ordem = "nome";
|
|
926
|
+
this.atualiza();
|
|
927
|
+
}
|
|
928
|
+
onSelectItem() {
|
|
929
|
+
if (!this.focus.hasInit()) {
|
|
930
|
+
setTimeout(() => {
|
|
931
|
+
this.focus.registerElementById("form-column");
|
|
932
|
+
this.focus.setFirst();
|
|
933
|
+
}, 500);
|
|
934
|
+
//this._focus.registerElementById("form-column");
|
|
935
|
+
}
|
|
936
|
+
else {
|
|
937
|
+
this.focus.setFirst();
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
ngOnDestroy() {
|
|
941
|
+
this.focus.unregisterElementById("form-column");
|
|
942
|
+
}
|
|
943
|
+
atualiza() {
|
|
944
|
+
this.isBusy = true;
|
|
945
|
+
this.ws.buscaFuncionario(this.setting)
|
|
946
|
+
.subscribe(r => {
|
|
947
|
+
this.items = r;
|
|
948
|
+
this.selectedItem = null;
|
|
949
|
+
console.info(r);
|
|
950
|
+
this.isBusy = false;
|
|
951
|
+
}, err => {
|
|
952
|
+
this.isBusy = false;
|
|
953
|
+
this.notification.showHttpError(err);
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
excluir() {
|
|
957
|
+
const item = this.selectedItem;
|
|
958
|
+
if (!item)
|
|
959
|
+
return;
|
|
960
|
+
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do funcionário ${item.nome}?`, () => {
|
|
961
|
+
this.isBusy = true;
|
|
962
|
+
this.ws.deleteFuncionario(item.id)
|
|
963
|
+
.subscribe(r => {
|
|
964
|
+
this.notification.showMsg("O funcionário foi excluído com sucesso.");
|
|
965
|
+
this.items.remove(item);
|
|
966
|
+
this.selectedItem = null;
|
|
967
|
+
this.isBusy = false;
|
|
968
|
+
}, err => {
|
|
969
|
+
this.isBusy = false;
|
|
970
|
+
this.notification.showMsg(err.error);
|
|
971
|
+
});
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
novo() {
|
|
975
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
976
|
+
let width = 550 + 'px';
|
|
977
|
+
if (this.mobile) {
|
|
978
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
979
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
980
|
+
}
|
|
981
|
+
const dialog = this.dialog.open(FuncionarioAddDialogComponent, {
|
|
982
|
+
width: width,
|
|
983
|
+
//height: height,
|
|
984
|
+
maxWidth: '100%',
|
|
985
|
+
panelClass: 'dialog-p0',
|
|
986
|
+
});
|
|
987
|
+
dialog.afterClosed().subscribe(result => {
|
|
988
|
+
if (result === undefined)
|
|
989
|
+
return;
|
|
990
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
991
|
+
this.atualiza();
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
abreCadastro(item) {
|
|
995
|
+
let height = undefined;
|
|
996
|
+
let width = 550 + 'px';
|
|
997
|
+
if (this.mobile) {
|
|
998
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
999
|
+
height = (window.innerHeight * 0.99) + 'px';
|
|
1000
|
+
}
|
|
1001
|
+
const dialog = this.dialog.open(FuncionarioEditDialogComponent, {
|
|
1002
|
+
data: item,
|
|
1003
|
+
width: width,
|
|
1004
|
+
//height: height,
|
|
1005
|
+
maxWidth: '100%',
|
|
1006
|
+
panelClass: 'dialog-p0',
|
|
1007
|
+
});
|
|
1008
|
+
dialog.afterClosed().subscribe(result => {
|
|
1009
|
+
if (result !== true)
|
|
1010
|
+
return;
|
|
1011
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1012
|
+
this.atualiza();
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
salvar() {
|
|
1016
|
+
const item = this.selectedItem;
|
|
1017
|
+
if (!item)
|
|
1018
|
+
return;
|
|
1019
|
+
const valMsg = valida(item, this.focus);
|
|
1020
|
+
if (valMsg) {
|
|
1021
|
+
this.notification.showMsgError(valMsg);
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
this.isBusy = true;
|
|
1025
|
+
this.ws.saveFuncionario(item)
|
|
1026
|
+
.subscribe(r => {
|
|
1027
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1028
|
+
this.isBusy = false;
|
|
1029
|
+
}, err => {
|
|
1030
|
+
this.isBusy = false;
|
|
1031
|
+
this.notification.showMsg(err.error);
|
|
1032
|
+
});
|
|
23
1033
|
}
|
|
24
1034
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1035
|
+
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 });
|
|
1036
|
+
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] });
|
|
1037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FuncionariosComponent, decorators: [{
|
|
28
1038
|
type: Component,
|
|
29
|
-
args: [{ selector: 'ox-
|
|
30
|
-
}], ctorParameters: function () { return [
|
|
31
|
-
type: Input
|
|
32
|
-
}] } });
|
|
1039
|
+
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"] }]
|
|
1040
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3$1.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
33
1041
|
|
|
34
1042
|
class CheckButtonComponent {
|
|
35
1043
|
constructor() {
|
|
@@ -115,7 +1123,7 @@ class ImageViewerComponent {
|
|
|
115
1123
|
}
|
|
116
1124
|
}
|
|
117
1125
|
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:
|
|
1126
|
+
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
1127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, decorators: [{
|
|
120
1128
|
type: Component,
|
|
121
1129
|
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 +1241,7 @@ class MonthYearPickerComponent {
|
|
|
233
1241
|
}
|
|
234
1242
|
}
|
|
235
1243
|
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:
|
|
1244
|
+
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
1245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, decorators: [{
|
|
238
1246
|
type: Component,
|
|
239
1247
|
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 +1342,7 @@ class NumericPickerComponent {
|
|
|
334
1342
|
}
|
|
335
1343
|
}
|
|
336
1344
|
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:
|
|
1345
|
+
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
1346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
|
|
339
1347
|
type: Component,
|
|
340
1348
|
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 +1406,7 @@ class PaginatorComponent {
|
|
|
398
1406
|
}
|
|
399
1407
|
}
|
|
400
1408
|
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:
|
|
1409
|
+
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
1410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
403
1411
|
type: Component,
|
|
404
1412
|
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 +1448,7 @@ class RadioButtonGroupComponent {
|
|
|
440
1448
|
}
|
|
441
1449
|
}
|
|
442
1450
|
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"] }] });
|
|
1451
|
+
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
1452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
|
|
445
1453
|
type: Component,
|
|
446
1454
|
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,48 +1460,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
452
1460
|
type: Input
|
|
453
1461
|
}] } });
|
|
454
1462
|
|
|
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 () {
|
|
491
|
-
return [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
|
|
492
|
-
type: Inject,
|
|
493
|
-
args: [MAT_DIALOG_DATA]
|
|
494
|
-
}] }];
|
|
495
|
-
} });
|
|
496
|
-
|
|
497
1463
|
class SafeHtmlPipe {
|
|
498
1464
|
constructor(sanitizer) {
|
|
499
1465
|
this.sanitizer = sanitizer;
|
|
@@ -511,6 +1477,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
511
1477
|
}]
|
|
512
1478
|
}], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
|
|
513
1479
|
|
|
1480
|
+
Array.prototype.remove = function (item) {
|
|
1481
|
+
const index = this.indexOf(item);
|
|
1482
|
+
if (index === -1)
|
|
1483
|
+
return false;
|
|
1484
|
+
this.splice(index, 1);
|
|
1485
|
+
return true;
|
|
1486
|
+
};
|
|
514
1487
|
Array.prototype.firstOrNull = function () {
|
|
515
1488
|
if (this.length > 0)
|
|
516
1489
|
return this[0];
|
|
@@ -533,12 +1506,17 @@ OxpiNglibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
533
1506
|
RadioButtonGroupComponent,
|
|
534
1507
|
ItemCardComponent,
|
|
535
1508
|
SafeHtmlPipe,
|
|
536
|
-
AlertDialogComponent
|
|
1509
|
+
AlertDialogComponent,
|
|
1510
|
+
FuncionariosComponent,
|
|
1511
|
+
FuncionarioFormComponent,
|
|
1512
|
+
FuncionarioEditDialogComponent,
|
|
1513
|
+
FuncionarioAddDialogComponent], imports: [BrowserModule,
|
|
537
1514
|
BrowserAnimationsModule,
|
|
538
1515
|
FormsModule,
|
|
539
1516
|
MatButtonModule,
|
|
540
1517
|
MatIconModule,
|
|
541
|
-
MatDialogModule
|
|
1518
|
+
MatDialogModule,
|
|
1519
|
+
MatSelectModule], exports: [BusyIndicatorComponent,
|
|
542
1520
|
MonthYearPickerComponent,
|
|
543
1521
|
ImageViewerComponent,
|
|
544
1522
|
NumericPickerComponent,
|
|
@@ -552,7 +1530,8 @@ OxpiNglibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
|
|
|
552
1530
|
FormsModule,
|
|
553
1531
|
MatButtonModule,
|
|
554
1532
|
MatIconModule,
|
|
555
|
-
MatDialogModule
|
|
1533
|
+
MatDialogModule,
|
|
1534
|
+
MatSelectModule] });
|
|
556
1535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: OxpiNglibModule, decorators: [{
|
|
557
1536
|
type: NgModule,
|
|
558
1537
|
args: [{
|
|
@@ -566,7 +1545,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
566
1545
|
RadioButtonGroupComponent,
|
|
567
1546
|
ItemCardComponent,
|
|
568
1547
|
SafeHtmlPipe,
|
|
569
|
-
AlertDialogComponent
|
|
1548
|
+
AlertDialogComponent,
|
|
1549
|
+
FuncionariosComponent,
|
|
1550
|
+
FuncionarioFormComponent,
|
|
1551
|
+
FuncionarioEditDialogComponent,
|
|
1552
|
+
FuncionarioAddDialogComponent
|
|
570
1553
|
],
|
|
571
1554
|
imports: [
|
|
572
1555
|
BrowserModule,
|
|
@@ -575,6 +1558,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
575
1558
|
MatButtonModule,
|
|
576
1559
|
MatIconModule,
|
|
577
1560
|
MatDialogModule,
|
|
1561
|
+
MatSelectModule,
|
|
578
1562
|
],
|
|
579
1563
|
exports: [
|
|
580
1564
|
BusyIndicatorComponent,
|
|
@@ -608,19 +1592,6 @@ class BusyState {
|
|
|
608
1592
|
}
|
|
609
1593
|
}
|
|
610
1594
|
|
|
611
|
-
class LazyTrigger {
|
|
612
|
-
constructor(doFunc, timeout = 800) {
|
|
613
|
-
this.doFunc = doFunc;
|
|
614
|
-
this.timeout = timeout;
|
|
615
|
-
}
|
|
616
|
-
fire() {
|
|
617
|
-
console.debug("lazyTimeoutId");
|
|
618
|
-
if (this.lazyTimeoutId != undefined)
|
|
619
|
-
clearTimeout(this.lazyTimeoutId);
|
|
620
|
-
this.lazyTimeoutId = window.setTimeout(() => { this.doFunc(); }, this.timeout);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
1595
|
class NumberParser {
|
|
625
1596
|
constructor(setPropFunc, getPropFunc, min, max, triggerMilliseconds = 1500) {
|
|
626
1597
|
this.setPropFunc = setPropFunc;
|
|
@@ -661,213 +1632,62 @@ class NumberParser {
|
|
|
661
1632
|
continue;
|
|
662
1633
|
toParseTxt = toParseTxt.concat(c);
|
|
663
1634
|
}
|
|
664
|
-
}
|
|
665
|
-
else {
|
|
666
|
-
toParseTxt = vlrTxt;
|
|
667
|
-
}
|
|
668
|
-
const vlr = parseFloat(toParseTxt);
|
|
669
|
-
if (isNaN(vlr) || !this.validaMinMax(vlr)) {
|
|
670
|
-
const original = this.getPropFunc();
|
|
671
|
-
this.setPropFunc(0);
|
|
672
|
-
setTimeout(() => this.setPropFunc(original));
|
|
673
|
-
}
|
|
674
|
-
else {
|
|
675
|
-
this.setPropFunc(vlr);
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
validaMinMax(value) {
|
|
679
|
-
if ((this.min === undefined) && this.max === undefined)
|
|
680
|
-
return true;
|
|
681
|
-
if (!(this.min === undefined) && value < this.min)
|
|
682
|
-
return false;
|
|
683
|
-
if (!(this.max === undefined) && value > this.max)
|
|
684
|
-
return false;
|
|
685
|
-
return true;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
class Ordem {
|
|
690
|
-
constructor(ordens, isCrescente, onToggle) {
|
|
691
|
-
const d = ordens.filter(x => x.default === true).firstOrNull();
|
|
692
|
-
this.colName = d === null ? ordens[0].value : d.value;
|
|
693
|
-
this.isCrescente = isCrescente;
|
|
694
|
-
this.onToggle = onToggle;
|
|
695
|
-
}
|
|
696
|
-
toggle() {
|
|
697
|
-
this.isCrescente = !this.isCrescente;
|
|
698
|
-
if (this.onToggle !== undefined)
|
|
699
|
-
this.onToggle();
|
|
700
|
-
}
|
|
701
|
-
toString() {
|
|
702
|
-
return this.colName + (!this.isCrescente ? " desc" : "");
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
function printTxt(txt) {
|
|
707
|
-
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>';
|
|
708
|
-
printHtml(r);
|
|
709
|
-
}
|
|
710
|
-
function printHtml(r) {
|
|
711
|
-
const blob = new Blob([r], { type: 'text/html' });
|
|
712
|
-
const url = window.URL.createObjectURL(blob);
|
|
713
|
-
const w = window.open(url, '_blank');
|
|
714
|
-
if (w != null)
|
|
715
|
-
w.print();
|
|
716
|
-
}
|
|
717
|
-
function selectText(ev) {
|
|
718
|
-
ev.target.select();
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
function valTextEmpty(v) {
|
|
722
|
-
return v === null ||
|
|
723
|
-
v === undefined ||
|
|
724
|
-
v.trim() === '';
|
|
725
|
-
}
|
|
726
|
-
function valNumberEmpty(v) {
|
|
727
|
-
return v === null ||
|
|
728
|
-
v === undefined ||
|
|
729
|
-
v === 0;
|
|
730
|
-
}
|
|
731
|
-
function valTextMax(v, max) {
|
|
732
|
-
return v.length > max;
|
|
733
|
-
}
|
|
734
|
-
function valNumberMin(v, min) {
|
|
735
|
-
if (v === null || v === undefined)
|
|
736
|
-
return true;
|
|
737
|
-
return v <= min;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
class NavegacaoSelecaoDialogUtil {
|
|
741
|
-
constructor(view) {
|
|
742
|
-
this.view = view;
|
|
743
|
-
}
|
|
744
|
-
onKeyDown(event) {
|
|
745
|
-
console.info(event.keyCode);
|
|
746
|
-
let key = event.keyCode;
|
|
747
|
-
const selected = this.view.selectedItem;
|
|
748
|
-
const enterKey = 13, keyDown = 40, keyUp = 38;
|
|
749
|
-
if (key === enterKey) {
|
|
750
|
-
event.cancelBubble = true;
|
|
751
|
-
if (selected !== null && selected !== undefined) {
|
|
752
|
-
this.view.dialogRef.close(selected);
|
|
753
|
-
return;
|
|
754
|
-
}
|
|
755
|
-
key = keyDown;
|
|
756
|
-
}
|
|
757
|
-
if (key !== keyDown && key !== keyUp)
|
|
758
|
-
return;
|
|
759
|
-
let index = this.view.items.indexOf(selected, 0);
|
|
760
|
-
if (key === keyDown)
|
|
761
|
-
index++;
|
|
762
|
-
if (key === keyUp && index > 0)
|
|
763
|
-
index--;
|
|
764
|
-
if (index > (this.view.items.length - 1))
|
|
765
|
-
return;
|
|
766
|
-
this.view.selectedItem = this.view.items[index];
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
function confirmaExclusao(dialog, msg, continueFunc) {
|
|
770
|
-
const args = {
|
|
771
|
-
titulo: "Atenção",
|
|
772
|
-
msg: msg
|
|
773
|
-
};
|
|
774
|
-
const dialogRef = dialog.open(AlertDialogComponent, {
|
|
775
|
-
data: args
|
|
776
|
-
});
|
|
777
|
-
dialogRef.afterClosed().subscribe(dialogResult => {
|
|
778
|
-
if (dialogResult !== true)
|
|
779
|
-
return;
|
|
780
|
-
continueFunc();
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
const fadeAnimation = trigger('fade', [
|
|
785
|
-
transition(':enter', [
|
|
786
|
-
style({ transform: 'translateY(100%)', opacity: 0 }),
|
|
787
|
-
animate('250ms', style({ transform: 'translateY(0)', 'opacity': 1 }))
|
|
788
|
-
]),
|
|
789
|
-
transition(':leave', [
|
|
790
|
-
style({ transform: 'translateY(0)', 'opacity': 1 }),
|
|
791
|
-
animate('250ms', style({ transform: 'translateY(100%)', 'opacity': 0 })),
|
|
792
|
-
])
|
|
793
|
-
]);
|
|
794
|
-
const menuLateralAnimation = trigger('menuLateral', [
|
|
795
|
-
transition(':enter', [
|
|
796
|
-
style({ transform: 'translateX(-100%)', opacity: 1 }),
|
|
797
|
-
animate('200ms', style({ transform: 'translateX(0)', 'opacity': 1 }))
|
|
798
|
-
]),
|
|
799
|
-
transition(':leave', [
|
|
800
|
-
style({ 'opacity': 1 }),
|
|
801
|
-
animate('200ms', style({ 'opacity': 0 })),
|
|
802
|
-
])
|
|
803
|
-
]);
|
|
804
|
-
|
|
805
|
-
class SearchSetting {
|
|
806
|
-
constructor(propChanged) {
|
|
807
|
-
this.propChanged = propChanged;
|
|
808
|
-
this._meses = ["JANEIRO", "FEVEREIRO", "MARÇO", "ABRIL", "MAIO", "JUNHO", "JULHO", "AGOSTO", "SETEMBRO", "OUTUBRO", "NOVEMBRO", "DEZEMBRO"];
|
|
809
|
-
this._mesesShort = ["JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ"];
|
|
810
|
-
const now = new Date();
|
|
811
|
-
const hj = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0);
|
|
812
|
-
console.info(hj);
|
|
813
|
-
this.modo = SearchMode.Mensal;
|
|
814
|
-
this.mes = hj.getMonth() + 1;
|
|
815
|
-
this.ano = hj.getFullYear();
|
|
816
|
-
this.inicial = hj.addDays(-30);
|
|
817
|
-
this.final = hj;
|
|
818
|
-
}
|
|
819
|
-
set(prop, value) {
|
|
820
|
-
const me = this;
|
|
821
|
-
me[prop] = value;
|
|
822
|
-
if (this.propChanged !== undefined)
|
|
823
|
-
this.propChanged();
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
toParseTxt = vlrTxt;
|
|
1638
|
+
}
|
|
1639
|
+
const vlr = parseFloat(toParseTxt);
|
|
1640
|
+
if (isNaN(vlr) || !this.validaMinMax(vlr)) {
|
|
1641
|
+
const original = this.getPropFunc();
|
|
1642
|
+
this.setPropFunc(0);
|
|
1643
|
+
setTimeout(() => this.setPropFunc(original));
|
|
1644
|
+
}
|
|
1645
|
+
else {
|
|
1646
|
+
this.setPropFunc(vlr);
|
|
1647
|
+
}
|
|
824
1648
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
if (this.
|
|
829
|
-
return
|
|
830
|
-
if (this.
|
|
831
|
-
return
|
|
832
|
-
|
|
833
|
-
return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}`;
|
|
834
|
-
return `${ini.getDate()}_${ini.getMonth() + 1}_${ini.getFullYear()}_ate_${fim.getDate()}_${fim.getMonth() + 1}_${fim.getFullYear()}`;
|
|
1649
|
+
validaMinMax(value) {
|
|
1650
|
+
if ((this.min === undefined) && this.max === undefined)
|
|
1651
|
+
return true;
|
|
1652
|
+
if (!(this.min === undefined) && value < this.min)
|
|
1653
|
+
return false;
|
|
1654
|
+
if (!(this.max === undefined) && value > this.max)
|
|
1655
|
+
return false;
|
|
1656
|
+
return true;
|
|
835
1657
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
return "" + this.ano;
|
|
845
|
-
if (this.modo === SearchMode.Diario)
|
|
846
|
-
return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()}`;
|
|
847
|
-
return `${ini.getDate()}/${ini.getMonth() + 1}/${ini.getFullYear()} ATÉ ${fim.getDate()}/${fim.getMonth() + 1}/${fim.getFullYear()}`;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
class Ordem {
|
|
1661
|
+
constructor(ordens, isCrescente, onToggle) {
|
|
1662
|
+
const d = ordens.filter(x => x.default === true).firstOrNull();
|
|
1663
|
+
this.colName = d === null ? ordens[0].value : d.value;
|
|
1664
|
+
this.isCrescente = isCrescente;
|
|
1665
|
+
this.onToggle = onToggle;
|
|
848
1666
|
}
|
|
849
|
-
|
|
850
|
-
this.
|
|
851
|
-
if (this.
|
|
852
|
-
this.
|
|
853
|
-
this.ano += 1;
|
|
854
|
-
}
|
|
1667
|
+
toggle() {
|
|
1668
|
+
this.isCrescente = !this.isCrescente;
|
|
1669
|
+
if (this.onToggle !== undefined)
|
|
1670
|
+
this.onToggle();
|
|
855
1671
|
}
|
|
856
|
-
|
|
857
|
-
this.
|
|
858
|
-
if (this.mes < 1) {
|
|
859
|
-
this.mes = 12;
|
|
860
|
-
this.ano -= 1;
|
|
861
|
-
}
|
|
1672
|
+
toString() {
|
|
1673
|
+
return this.colName + (!this.isCrescente ? " desc" : "");
|
|
862
1674
|
}
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
function printTxt(txt) {
|
|
1678
|
+
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>';
|
|
1679
|
+
printHtml(r);
|
|
863
1680
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
}
|
|
1681
|
+
function printHtml(r) {
|
|
1682
|
+
const blob = new Blob([r], { type: 'text/html' });
|
|
1683
|
+
const url = window.URL.createObjectURL(blob);
|
|
1684
|
+
const w = window.open(url, '_blank');
|
|
1685
|
+
if (w != null)
|
|
1686
|
+
w.print();
|
|
1687
|
+
}
|
|
1688
|
+
function selectText(ev) {
|
|
1689
|
+
ev.target.select();
|
|
1690
|
+
}
|
|
871
1691
|
|
|
872
1692
|
class PagamentoRecebimentoSearchSetting extends SearchSetting {
|
|
873
1693
|
constructor() {
|
|
@@ -979,76 +1799,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
979
1799
|
}]
|
|
980
1800
|
}], ctorParameters: function () { return []; } });
|
|
981
1801
|
|
|
982
|
-
class FocusService {
|
|
983
|
-
constructor() {
|
|
984
|
-
}
|
|
985
|
-
hasInit() {
|
|
986
|
-
return this._element !== undefined;
|
|
987
|
-
}
|
|
988
|
-
registerElementById(name) {
|
|
989
|
-
this.registerElement(document.getElementById(name));
|
|
990
|
-
}
|
|
991
|
-
registerElement(element) {
|
|
992
|
-
if (element === null || element === undefined)
|
|
993
|
-
return;
|
|
994
|
-
this._element = element;
|
|
995
|
-
//this._items = this.getItems();
|
|
996
|
-
console.info(element);
|
|
997
|
-
element.addEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
|
|
998
|
-
}
|
|
999
|
-
registerWindow() {
|
|
1000
|
-
this._element = null;
|
|
1001
|
-
//this._items = this.getItems();
|
|
1002
|
-
window.addEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
|
|
1003
|
-
}
|
|
1004
|
-
unregisterElementById(name) {
|
|
1005
|
-
this.unregisterElement(document.getElementById(name));
|
|
1006
|
-
}
|
|
1007
|
-
unregisterElement(element) {
|
|
1008
|
-
if (element === null || element === undefined)
|
|
1009
|
-
return;
|
|
1010
|
-
element.removeEventListener('keydown', (ev) => this.handleKeyboardEvent(ev));
|
|
1011
|
-
}
|
|
1012
|
-
handleKeyboardEvent(event) {
|
|
1013
|
-
if (event.keyCode !== 13)
|
|
1014
|
-
return;
|
|
1015
|
-
if (event.target.nodeName === "BUTTON")
|
|
1016
|
-
return;
|
|
1017
|
-
const items = this.getItems();
|
|
1018
|
-
const index = Array.prototype.indexOf.call(items, event.target);
|
|
1019
|
-
const nextIndex = index + 1;
|
|
1020
|
-
if (nextIndex > items.length - 1)
|
|
1021
|
-
return;
|
|
1022
|
-
const i = items[index + 1];
|
|
1023
|
-
if (i.tabIndex > -1)
|
|
1024
|
-
i.focus();
|
|
1025
|
-
event.preventDefault();
|
|
1026
|
-
}
|
|
1027
|
-
setFirst() {
|
|
1028
|
-
const el = this.getItems()[0]; //[0];
|
|
1029
|
-
if (el !== undefined)
|
|
1030
|
-
el.focus();
|
|
1031
|
-
}
|
|
1032
|
-
getItems() {
|
|
1033
|
-
const query = this._element !== null && this._element !== undefined ?
|
|
1034
|
-
this._element.querySelectorAll('input,button, [tabindex]:not([tabindex="-1"])') :
|
|
1035
|
-
document.querySelectorAll('input,button, [tabindex]:not([tabindex="-1"])');
|
|
1036
|
-
const items = [];
|
|
1037
|
-
for (let index = 0; index < query.length; index++) {
|
|
1038
|
-
const el = query[index];
|
|
1039
|
-
if (el.tabIndex > 0)
|
|
1040
|
-
items.push(el);
|
|
1041
|
-
}
|
|
1042
|
-
return items;
|
|
1043
|
-
}
|
|
1044
|
-
set(id) {
|
|
1045
|
-
const el = document.getElementById(id);
|
|
1046
|
-
if (el === null)
|
|
1047
|
-
return;
|
|
1048
|
-
el.focus();
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
1802
|
class Preferences {
|
|
1053
1803
|
constructor() {
|
|
1054
1804
|
}
|
|
@@ -1089,101 +1839,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
1089
1839
|
}]
|
|
1090
1840
|
}], ctorParameters: function () { return []; } });
|
|
1091
1841
|
|
|
1092
|
-
const SM_WIDTH = 576;
|
|
1093
|
-
const MD_WIDTH = 768;
|
|
1094
|
-
const LG_WIDTH = 992;
|
|
1095
|
-
const XL_WIDTH = 1200;
|
|
1096
|
-
const XXL_WIDTH = 1400;
|
|
1097
|
-
class ScreenHelperService {
|
|
1098
|
-
constructor() {
|
|
1099
|
-
this.changedMobileScreen = new EventEmitter();
|
|
1100
|
-
this.changedMediumScreen = new EventEmitter();
|
|
1101
|
-
this.changedLargeScreen = new EventEmitter();
|
|
1102
|
-
this.changedXLargeScreen = new EventEmitter();
|
|
1103
|
-
this.changedXXLargeScreen = new EventEmitter();
|
|
1104
|
-
this.changedMinSmallScreen = new EventEmitter();
|
|
1105
|
-
this.changedMinMediumScreen = new EventEmitter();
|
|
1106
|
-
this.changedMinLargeScreen = new EventEmitter();
|
|
1107
|
-
this.changedMinXLargeScreen = new EventEmitter();
|
|
1108
|
-
this.changedMinXXLargeScreen = new EventEmitter();
|
|
1109
|
-
this.mobileScreen = false;
|
|
1110
|
-
this.isMedium = false;
|
|
1111
|
-
this.isLarge = false;
|
|
1112
|
-
this.isXLarge = false;
|
|
1113
|
-
this.isXXLarge = false;
|
|
1114
|
-
this.minSmall = false;
|
|
1115
|
-
this.minMedium = false;
|
|
1116
|
-
this.minLarge = false;
|
|
1117
|
-
this.minXLarge = false;
|
|
1118
|
-
this.minXXLarge = false;
|
|
1119
|
-
this.determinaMobileScreen();
|
|
1120
|
-
window.addEventListener('resize', (event) => {
|
|
1121
|
-
this.determinaMobileScreen();
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
determinaMobileScreen() {
|
|
1125
|
-
const width = window.innerWidth;
|
|
1126
|
-
const isSmall = width <= SM_WIDTH;
|
|
1127
|
-
const isMedium = width <= MD_WIDTH;
|
|
1128
|
-
const isLarge = width <= LG_WIDTH;
|
|
1129
|
-
const isXLarge = width <= XL_WIDTH;
|
|
1130
|
-
const isXXLarge = width <= XXL_WIDTH;
|
|
1131
|
-
const minSmall = width >= SM_WIDTH;
|
|
1132
|
-
const minMedium = width >= MD_WIDTH;
|
|
1133
|
-
const minLarge = width >= LG_WIDTH;
|
|
1134
|
-
const minXLarge = width >= XL_WIDTH;
|
|
1135
|
-
const minXXLarge = width >= XXL_WIDTH;
|
|
1136
|
-
if (isSmall !== this.mobileScreen) {
|
|
1137
|
-
this.changedMobileScreen.emit(isSmall);
|
|
1138
|
-
this.mobileScreen = isSmall;
|
|
1139
|
-
}
|
|
1140
|
-
if (isMedium !== this.isMedium) {
|
|
1141
|
-
this.changedMediumScreen.emit(isMedium);
|
|
1142
|
-
this.isMedium = isMedium;
|
|
1143
|
-
}
|
|
1144
|
-
if (isLarge !== this.isLarge) {
|
|
1145
|
-
this.changedLargeScreen.emit(isLarge);
|
|
1146
|
-
this.isLarge = isLarge;
|
|
1147
|
-
}
|
|
1148
|
-
if (isXLarge !== this.isXLarge) {
|
|
1149
|
-
this.changedXLargeScreen.emit(isXLarge);
|
|
1150
|
-
this.isXLarge = isXLarge;
|
|
1151
|
-
}
|
|
1152
|
-
if (isXXLarge !== this.isXXLarge) {
|
|
1153
|
-
this.changedXXLargeScreen.emit(isXXLarge);
|
|
1154
|
-
this.isXXLarge = isXXLarge;
|
|
1155
|
-
}
|
|
1156
|
-
if (minSmall !== this.minSmall) {
|
|
1157
|
-
this.changedMinSmallScreen.emit(isSmall);
|
|
1158
|
-
this.minMedium = isSmall;
|
|
1159
|
-
}
|
|
1160
|
-
if (minMedium !== this.minMedium) {
|
|
1161
|
-
this.changedMinMediumScreen.emit(isMedium);
|
|
1162
|
-
this.minMedium = isMedium;
|
|
1163
|
-
}
|
|
1164
|
-
if (minLarge !== this.minLarge) {
|
|
1165
|
-
this.changedMinLargeScreen.emit(minLarge);
|
|
1166
|
-
this.minLarge = minLarge;
|
|
1167
|
-
}
|
|
1168
|
-
if (minXLarge !== this.minXLarge) {
|
|
1169
|
-
this.changedMinXLargeScreen.emit(minXLarge);
|
|
1170
|
-
this.minXLarge = minXLarge;
|
|
1171
|
-
}
|
|
1172
|
-
if (minXXLarge !== this.minXXLarge) {
|
|
1173
|
-
this.changedMinXXLargeScreen.emit(minXXLarge);
|
|
1174
|
-
this.minXXLarge = minXXLarge;
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
ScreenHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1179
|
-
ScreenHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, providedIn: 'root' });
|
|
1180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ScreenHelperService, decorators: [{
|
|
1181
|
-
type: Injectable,
|
|
1182
|
-
args: [{
|
|
1183
|
-
providedIn: 'root'
|
|
1184
|
-
}]
|
|
1185
|
-
}], ctorParameters: function () { return []; } });
|
|
1186
|
-
|
|
1187
1842
|
/*
|
|
1188
1843
|
* Public API Surface of oxpi-nglib
|
|
1189
1844
|
*/
|
|
@@ -1192,5 +1847,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
1192
1847
|
* Generated bundle index. Do not edit.
|
|
1193
1848
|
*/
|
|
1194
1849
|
|
|
1195
|
-
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 };
|
|
1850
|
+
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 };
|
|
1196
1851
|
//# sourceMappingURL=oxpi-nglib.mjs.map
|