kwikid-agent-dashboard 0.0.0-watch → 0.0.3
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/bundles/kwikid-agent-dashboard.umd.js +1470 -0
- package/bundles/kwikid-agent-dashboard.umd.js.map +1 -0
- package/esm2015/kwikid-agent-dashboard.js +4 -4
- package/esm2015/lib/components/add-customer/add-customer.component.js +66 -66
- package/esm2015/lib/components/customer-list/customer-list.component.js +121 -121
- package/esm2015/lib/components/customer-tile/customer-tile.component.js +107 -107
- package/esm2015/lib/components/menu/menu.component.js +34 -34
- package/esm2015/lib/kwikid-agent-dashboard.component.js +166 -166
- package/esm2015/lib/kwikid-agent-dashboard.module.js +87 -87
- package/esm2015/lib/services/agent.service.js +47 -47
- package/esm2015/lib/services/customer.service.js +20 -20
- package/esm2015/lib/services/info-window.service.js +183 -183
- package/esm2015/lib/services/map.service.js +175 -175
- package/esm2015/lib/shared/interfaces/customer.js +2 -2
- package/esm2015/lib/svgs/kyc-pending/kyc-pending.component.js +18 -18
- package/esm2015/lib/svgs/kyc-success/kyc-success.component.js +18 -18
- package/esm2015/public_api.js +5 -5
- package/fesm2015/kwikid-agent-dashboard.js +951 -951
- package/fesm2015/kwikid-agent-dashboard.js.map +1 -1
- package/kwikid-agent-dashboard.d.ts +5 -5
- package/lib/components/add-customer/add-customer.component.d.ts +16 -16
- package/lib/components/customer-list/customer-list.component.d.ts +76 -76
- package/lib/components/customer-tile/customer-tile.component.d.ts +67 -67
- package/lib/components/menu/menu.component.d.ts +18 -18
- package/lib/kwikid-agent-dashboard.component.d.ts +110 -110
- package/lib/kwikid-agent-dashboard.module.d.ts +20 -20
- package/lib/services/agent.service.d.ts +18 -18
- package/lib/services/customer.service.d.ts +9 -9
- package/lib/services/info-window.service.d.ts +98 -98
- package/lib/services/map.service.d.ts +27 -27
- package/lib/shared/interfaces/customer.d.ts +16 -16
- package/lib/svgs/kyc-pending/kyc-pending.component.d.ts +8 -8
- package/lib/svgs/kyc-success/kyc-success.component.d.ts +8 -8
- package/package.json +1 -1
- package/public_api.d.ts +2 -2
|
@@ -0,0 +1,1470 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('kwikui'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@angular/common'), require('@angular/common/http'), require('@angular/router/testing'), require('@taiga-ui/addon-mobile')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('kwikid-agent-dashboard', ['exports', '@angular/core', 'kwikui', '@angular/forms', '@taiga-ui/cdk', '@angular/common', '@angular/common/http', '@angular/router/testing', '@taiga-ui/addon-mobile'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-agent-dashboard"] = {}, global.ng.core, global.i5, global.ng.forms, global["@taiga-ui/cdk"], global.ng.common, global.ng.common.http, global.ng.router.testing, global["@taiga-ui/addon-mobile"]));
|
|
5
|
+
})(this, (function (exports, i0, i5, i5$1, cdk, i6, http, testing, addonMobile) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
27
|
+
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
28
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
29
|
+
|
|
30
|
+
/******************************************************************************
|
|
31
|
+
Copyright (c) Microsoft Corporation.
|
|
32
|
+
|
|
33
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
34
|
+
purpose with or without fee is hereby granted.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
37
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
38
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
39
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
40
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
41
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
42
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
43
|
+
***************************************************************************** */
|
|
44
|
+
/* global Reflect, Promise */
|
|
45
|
+
var extendStatics = function (d, b) {
|
|
46
|
+
extendStatics = Object.setPrototypeOf ||
|
|
47
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
48
|
+
function (d, b) { for (var p in b)
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
50
|
+
d[p] = b[p]; };
|
|
51
|
+
return extendStatics(d, b);
|
|
52
|
+
};
|
|
53
|
+
function __extends(d, b) {
|
|
54
|
+
if (typeof b !== "function" && b !== null)
|
|
55
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
56
|
+
extendStatics(d, b);
|
|
57
|
+
function __() { this.constructor = d; }
|
|
58
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
59
|
+
}
|
|
60
|
+
var __assign = function () {
|
|
61
|
+
__assign = Object.assign || function __assign(t) {
|
|
62
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
63
|
+
s = arguments[i];
|
|
64
|
+
for (var p in s)
|
|
65
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
66
|
+
t[p] = s[p];
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
};
|
|
70
|
+
return __assign.apply(this, arguments);
|
|
71
|
+
};
|
|
72
|
+
function __rest(s, e) {
|
|
73
|
+
var t = {};
|
|
74
|
+
for (var p in s)
|
|
75
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
76
|
+
t[p] = s[p];
|
|
77
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
78
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
79
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
80
|
+
t[p[i]] = s[p[i]];
|
|
81
|
+
}
|
|
82
|
+
return t;
|
|
83
|
+
}
|
|
84
|
+
function __decorate(decorators, target, key, desc) {
|
|
85
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
86
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
87
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
88
|
+
else
|
|
89
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
90
|
+
if (d = decorators[i])
|
|
91
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
92
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
93
|
+
}
|
|
94
|
+
function __param(paramIndex, decorator) {
|
|
95
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
96
|
+
}
|
|
97
|
+
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
98
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
99
|
+
throw new TypeError("Function expected"); return f; }
|
|
100
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
101
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
102
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
103
|
+
var _, done = false;
|
|
104
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
105
|
+
var context = {};
|
|
106
|
+
for (var p in contextIn)
|
|
107
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
108
|
+
for (var p in contextIn.access)
|
|
109
|
+
context.access[p] = contextIn.access[p];
|
|
110
|
+
context.addInitializer = function (f) { if (done)
|
|
111
|
+
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
112
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
113
|
+
if (kind === "accessor") {
|
|
114
|
+
if (result === void 0)
|
|
115
|
+
continue;
|
|
116
|
+
if (result === null || typeof result !== "object")
|
|
117
|
+
throw new TypeError("Object expected");
|
|
118
|
+
if (_ = accept(result.get))
|
|
119
|
+
descriptor.get = _;
|
|
120
|
+
if (_ = accept(result.set))
|
|
121
|
+
descriptor.set = _;
|
|
122
|
+
if (_ = accept(result.init))
|
|
123
|
+
initializers.push(_);
|
|
124
|
+
}
|
|
125
|
+
else if (_ = accept(result)) {
|
|
126
|
+
if (kind === "field")
|
|
127
|
+
initializers.push(_);
|
|
128
|
+
else
|
|
129
|
+
descriptor[key] = _;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (target)
|
|
133
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
134
|
+
done = true;
|
|
135
|
+
}
|
|
136
|
+
;
|
|
137
|
+
function __runInitializers(thisArg, initializers, value) {
|
|
138
|
+
var useValue = arguments.length > 2;
|
|
139
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
140
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
141
|
+
}
|
|
142
|
+
return useValue ? value : void 0;
|
|
143
|
+
}
|
|
144
|
+
;
|
|
145
|
+
function __propKey(x) {
|
|
146
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
147
|
+
}
|
|
148
|
+
;
|
|
149
|
+
function __setFunctionName(f, name, prefix) {
|
|
150
|
+
if (typeof name === "symbol")
|
|
151
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
152
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
153
|
+
}
|
|
154
|
+
;
|
|
155
|
+
function __metadata(metadataKey, metadataValue) {
|
|
156
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
157
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
158
|
+
}
|
|
159
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
160
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
161
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
162
|
+
function fulfilled(value) { try {
|
|
163
|
+
step(generator.next(value));
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
reject(e);
|
|
167
|
+
} }
|
|
168
|
+
function rejected(value) { try {
|
|
169
|
+
step(generator["throw"](value));
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
reject(e);
|
|
173
|
+
} }
|
|
174
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
175
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function __generator(thisArg, body) {
|
|
179
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
180
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
181
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
182
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
183
|
+
function step(op) {
|
|
184
|
+
if (f)
|
|
185
|
+
throw new TypeError("Generator is already executing.");
|
|
186
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
187
|
+
try {
|
|
188
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
189
|
+
return t;
|
|
190
|
+
if (y = 0, t)
|
|
191
|
+
op = [op[0] & 2, t.value];
|
|
192
|
+
switch (op[0]) {
|
|
193
|
+
case 0:
|
|
194
|
+
case 1:
|
|
195
|
+
t = op;
|
|
196
|
+
break;
|
|
197
|
+
case 4:
|
|
198
|
+
_.label++;
|
|
199
|
+
return { value: op[1], done: false };
|
|
200
|
+
case 5:
|
|
201
|
+
_.label++;
|
|
202
|
+
y = op[1];
|
|
203
|
+
op = [0];
|
|
204
|
+
continue;
|
|
205
|
+
case 7:
|
|
206
|
+
op = _.ops.pop();
|
|
207
|
+
_.trys.pop();
|
|
208
|
+
continue;
|
|
209
|
+
default:
|
|
210
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
211
|
+
_ = 0;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
215
|
+
_.label = op[1];
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
219
|
+
_.label = t[1];
|
|
220
|
+
t = op;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
if (t && _.label < t[2]) {
|
|
224
|
+
_.label = t[2];
|
|
225
|
+
_.ops.push(op);
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
if (t[2])
|
|
229
|
+
_.ops.pop();
|
|
230
|
+
_.trys.pop();
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
op = body.call(thisArg, _);
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
op = [6, e];
|
|
237
|
+
y = 0;
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
f = t = 0;
|
|
241
|
+
}
|
|
242
|
+
if (op[0] & 5)
|
|
243
|
+
throw op[1];
|
|
244
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
248
|
+
if (k2 === undefined)
|
|
249
|
+
k2 = k;
|
|
250
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
251
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
252
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
253
|
+
}
|
|
254
|
+
Object.defineProperty(o, k2, desc);
|
|
255
|
+
}) : (function (o, m, k, k2) {
|
|
256
|
+
if (k2 === undefined)
|
|
257
|
+
k2 = k;
|
|
258
|
+
o[k2] = m[k];
|
|
259
|
+
});
|
|
260
|
+
function __exportStar(m, o) {
|
|
261
|
+
for (var p in m)
|
|
262
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
263
|
+
__createBinding(o, m, p);
|
|
264
|
+
}
|
|
265
|
+
function __values(o) {
|
|
266
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
267
|
+
if (m)
|
|
268
|
+
return m.call(o);
|
|
269
|
+
if (o && typeof o.length === "number")
|
|
270
|
+
return {
|
|
271
|
+
next: function () {
|
|
272
|
+
if (o && i >= o.length)
|
|
273
|
+
o = void 0;
|
|
274
|
+
return { value: o && o[i++], done: !o };
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
278
|
+
}
|
|
279
|
+
function __read(o, n) {
|
|
280
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
281
|
+
if (!m)
|
|
282
|
+
return o;
|
|
283
|
+
var i = m.call(o), r, ar = [], e;
|
|
284
|
+
try {
|
|
285
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
286
|
+
ar.push(r.value);
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
e = { error: error };
|
|
290
|
+
}
|
|
291
|
+
finally {
|
|
292
|
+
try {
|
|
293
|
+
if (r && !r.done && (m = i["return"]))
|
|
294
|
+
m.call(i);
|
|
295
|
+
}
|
|
296
|
+
finally {
|
|
297
|
+
if (e)
|
|
298
|
+
throw e.error;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return ar;
|
|
302
|
+
}
|
|
303
|
+
/** @deprecated */
|
|
304
|
+
function __spread() {
|
|
305
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
306
|
+
ar = ar.concat(__read(arguments[i]));
|
|
307
|
+
return ar;
|
|
308
|
+
}
|
|
309
|
+
/** @deprecated */
|
|
310
|
+
function __spreadArrays() {
|
|
311
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
312
|
+
s += arguments[i].length;
|
|
313
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
314
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
315
|
+
r[k] = a[j];
|
|
316
|
+
return r;
|
|
317
|
+
}
|
|
318
|
+
function __spreadArray(to, from, pack) {
|
|
319
|
+
if (pack || arguments.length === 2)
|
|
320
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
321
|
+
if (ar || !(i in from)) {
|
|
322
|
+
if (!ar)
|
|
323
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
324
|
+
ar[i] = from[i];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
328
|
+
}
|
|
329
|
+
function __await(v) {
|
|
330
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
331
|
+
}
|
|
332
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
333
|
+
if (!Symbol.asyncIterator)
|
|
334
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
335
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
336
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
337
|
+
function verb(n) { if (g[n])
|
|
338
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
339
|
+
function resume(n, v) { try {
|
|
340
|
+
step(g[n](v));
|
|
341
|
+
}
|
|
342
|
+
catch (e) {
|
|
343
|
+
settle(q[0][3], e);
|
|
344
|
+
} }
|
|
345
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
346
|
+
function fulfill(value) { resume("next", value); }
|
|
347
|
+
function reject(value) { resume("throw", value); }
|
|
348
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
349
|
+
resume(q[0][0], q[0][1]); }
|
|
350
|
+
}
|
|
351
|
+
function __asyncDelegator(o) {
|
|
352
|
+
var i, p;
|
|
353
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
354
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
355
|
+
}
|
|
356
|
+
function __asyncValues(o) {
|
|
357
|
+
if (!Symbol.asyncIterator)
|
|
358
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
359
|
+
var m = o[Symbol.asyncIterator], i;
|
|
360
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
361
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
362
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
363
|
+
}
|
|
364
|
+
function __makeTemplateObject(cooked, raw) {
|
|
365
|
+
if (Object.defineProperty) {
|
|
366
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
cooked.raw = raw;
|
|
370
|
+
}
|
|
371
|
+
return cooked;
|
|
372
|
+
}
|
|
373
|
+
;
|
|
374
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
375
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
376
|
+
}) : function (o, v) {
|
|
377
|
+
o["default"] = v;
|
|
378
|
+
};
|
|
379
|
+
function __importStar(mod) {
|
|
380
|
+
if (mod && mod.__esModule)
|
|
381
|
+
return mod;
|
|
382
|
+
var result = {};
|
|
383
|
+
if (mod != null)
|
|
384
|
+
for (var k in mod)
|
|
385
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
386
|
+
__createBinding(result, mod, k);
|
|
387
|
+
__setModuleDefault(result, mod);
|
|
388
|
+
return result;
|
|
389
|
+
}
|
|
390
|
+
function __importDefault(mod) {
|
|
391
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
392
|
+
}
|
|
393
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
394
|
+
if (kind === "a" && !f)
|
|
395
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
396
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
397
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
398
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
399
|
+
}
|
|
400
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
401
|
+
if (kind === "m")
|
|
402
|
+
throw new TypeError("Private method is not writable");
|
|
403
|
+
if (kind === "a" && !f)
|
|
404
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
405
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
406
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
407
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
408
|
+
}
|
|
409
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
410
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
411
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
412
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
var AgentService = /** @class */ (function () {
|
|
416
|
+
function AgentService() {
|
|
417
|
+
this.agentConfig = {};
|
|
418
|
+
this.showMenu = false;
|
|
419
|
+
this.showMapview = true;
|
|
420
|
+
this.addTask = false;
|
|
421
|
+
}
|
|
422
|
+
AgentService.prototype.getAgentConfig = function () {
|
|
423
|
+
return this.agentConfig;
|
|
424
|
+
};
|
|
425
|
+
AgentService.prototype.setAgentConfig = function (agentConfig) {
|
|
426
|
+
this.agentConfig = agentConfig;
|
|
427
|
+
};
|
|
428
|
+
AgentService.prototype.setMapview = function (value) {
|
|
429
|
+
this.showMapview = value;
|
|
430
|
+
};
|
|
431
|
+
AgentService.prototype.getAddTask = function () {
|
|
432
|
+
return this.addTask;
|
|
433
|
+
};
|
|
434
|
+
AgentService.prototype.setAddTask = function (value) {
|
|
435
|
+
this.addTask = value;
|
|
436
|
+
this.setMenu(false);
|
|
437
|
+
};
|
|
438
|
+
AgentService.prototype.toggleMapview = function () {
|
|
439
|
+
this.showMapview = !this.showMapview;
|
|
440
|
+
};
|
|
441
|
+
AgentService.prototype.getMenu = function () {
|
|
442
|
+
return this.showMenu;
|
|
443
|
+
};
|
|
444
|
+
AgentService.prototype.setMenu = function (value) {
|
|
445
|
+
this.showMenu = value;
|
|
446
|
+
};
|
|
447
|
+
AgentService.prototype.toggleMenu = function () {
|
|
448
|
+
this.showMenu = !this.showMenu;
|
|
449
|
+
};
|
|
450
|
+
return AgentService;
|
|
451
|
+
}());
|
|
452
|
+
/** @nocollapse */ AgentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AgentService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
453
|
+
/** @nocollapse */ AgentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AgentService, providedIn: 'root' });
|
|
454
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AgentService, decorators: [{
|
|
455
|
+
type: i0.Injectable,
|
|
456
|
+
args: [{
|
|
457
|
+
providedIn: 'root'
|
|
458
|
+
}]
|
|
459
|
+
}] });
|
|
460
|
+
|
|
461
|
+
var MapService = /** @class */ (function () {
|
|
462
|
+
function MapService(agentService) {
|
|
463
|
+
this.agentService = agentService;
|
|
464
|
+
this.allCustomersMarkers = [];
|
|
465
|
+
}
|
|
466
|
+
MapService.prototype.getMyPosition = function () {
|
|
467
|
+
return this.myPosition;
|
|
468
|
+
};
|
|
469
|
+
MapService.prototype.getMap = function () {
|
|
470
|
+
return this.map;
|
|
471
|
+
};
|
|
472
|
+
MapService.prototype.setMap = function (map) {
|
|
473
|
+
this.map = map;
|
|
474
|
+
};
|
|
475
|
+
MapService.prototype.getMarkers = function () {
|
|
476
|
+
return this.allCustomersMarkers;
|
|
477
|
+
};
|
|
478
|
+
MapService.prototype.setMarkers = function (markers) {
|
|
479
|
+
this.allCustomersMarkers = markers;
|
|
480
|
+
};
|
|
481
|
+
MapService.prototype.initMap = function (mapElement) {
|
|
482
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
483
|
+
var _a;
|
|
484
|
+
return __generator(this, function (_b) {
|
|
485
|
+
switch (_b.label) {
|
|
486
|
+
case 0:
|
|
487
|
+
_a = this;
|
|
488
|
+
return [4 /*yield*/, this.getPosition().then(function (pos) {
|
|
489
|
+
return {
|
|
490
|
+
lat: pos.lat,
|
|
491
|
+
lng: pos.lng
|
|
492
|
+
};
|
|
493
|
+
})];
|
|
494
|
+
case 1:
|
|
495
|
+
_a.myPosition = _b.sent();
|
|
496
|
+
this.map = new google.maps.Map(mapElement.nativeElement, {
|
|
497
|
+
zoom: 10,
|
|
498
|
+
center: this.myPosition,
|
|
499
|
+
streetViewControl: false,
|
|
500
|
+
mapTypeControl: false,
|
|
501
|
+
fullscreenControl: false,
|
|
502
|
+
zoomControl: false,
|
|
503
|
+
});
|
|
504
|
+
return [2 /*return*/];
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
MapService.prototype.plotMarkers = function (customers) {
|
|
510
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
511
|
+
var path, marker, origin;
|
|
512
|
+
var _this = this;
|
|
513
|
+
return __generator(this, function (_a) {
|
|
514
|
+
switch (_a.label) {
|
|
515
|
+
case 0:
|
|
516
|
+
path = [];
|
|
517
|
+
marker = new google.maps.Marker({
|
|
518
|
+
position: this.myPosition,
|
|
519
|
+
map: this.map,
|
|
520
|
+
animation: google.maps.Animation.DROP
|
|
521
|
+
});
|
|
522
|
+
origin = marker.getPosition();
|
|
523
|
+
customers.map(function (customer) {
|
|
524
|
+
path.push({
|
|
525
|
+
location: _this.getLatLng(customer.extras.loc),
|
|
526
|
+
stopover: true
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
return [4 /*yield*/, this.calcRoute(customers, origin, path)];
|
|
530
|
+
case 1:
|
|
531
|
+
customers = _a.sent();
|
|
532
|
+
customers.map(function (customer, index) {
|
|
533
|
+
var marker = new google.maps.Marker({
|
|
534
|
+
position: _this.getLatLng(customer.extras.loc),
|
|
535
|
+
map: _this.map,
|
|
536
|
+
animation: google.maps.Animation.DROP,
|
|
537
|
+
label: {
|
|
538
|
+
text: String(index + 1),
|
|
539
|
+
color: '#FFF'
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
_this.allCustomersMarkers.push(marker);
|
|
543
|
+
});
|
|
544
|
+
return [2 /*return*/, customers];
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
});
|
|
548
|
+
};
|
|
549
|
+
MapService.prototype.calcRoute = function (customers, origin, waypoints) {
|
|
550
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
551
|
+
var directionsService, directionsRenderer, destination, request, sortList, customersData;
|
|
552
|
+
return __generator(this, function (_a) {
|
|
553
|
+
switch (_a.label) {
|
|
554
|
+
case 0:
|
|
555
|
+
directionsService = new google.maps.DirectionsService();
|
|
556
|
+
directionsRenderer = new google.maps.DirectionsRenderer({
|
|
557
|
+
suppressMarkers: true
|
|
558
|
+
});
|
|
559
|
+
destination = new google.maps.LatLng(19.0996079, 72.9144412);
|
|
560
|
+
directionsRenderer.setMap(this.map);
|
|
561
|
+
request = {
|
|
562
|
+
origin: origin,
|
|
563
|
+
destination: destination,
|
|
564
|
+
waypoints: waypoints,
|
|
565
|
+
optimizeWaypoints: true,
|
|
566
|
+
travelMode: 'DRIVING'
|
|
567
|
+
};
|
|
568
|
+
sortList = this.sortList;
|
|
569
|
+
customersData = customers;
|
|
570
|
+
return [4 /*yield*/, directionsService.route(request, function (result, status) {
|
|
571
|
+
if (status == 'OK') {
|
|
572
|
+
directionsRenderer.setDirections(result);
|
|
573
|
+
customersData = sortList(result.routes[0].waypoint_order, customersData);
|
|
574
|
+
}
|
|
575
|
+
})];
|
|
576
|
+
case 1:
|
|
577
|
+
_a.sent();
|
|
578
|
+
this.allCustomersDirections = directionsRenderer;
|
|
579
|
+
return [2 /*return*/, customersData];
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
});
|
|
583
|
+
};
|
|
584
|
+
MapService.prototype.getPosition = function () {
|
|
585
|
+
return new Promise(function (resolve, reject) {
|
|
586
|
+
navigator.geolocation.watchPosition(function (resp) {
|
|
587
|
+
resolve({
|
|
588
|
+
lng: resp.coords.longitude,
|
|
589
|
+
lat: resp.coords.latitude
|
|
590
|
+
});
|
|
591
|
+
}, function (err) {
|
|
592
|
+
reject(err);
|
|
593
|
+
});
|
|
594
|
+
});
|
|
595
|
+
};
|
|
596
|
+
MapService.prototype.getLatLng = function (data) {
|
|
597
|
+
return new google.maps.LatLng(data[0], data[1]);
|
|
598
|
+
};
|
|
599
|
+
MapService.prototype.sortList = function (order, customersData) {
|
|
600
|
+
var c = [];
|
|
601
|
+
for (var i = 0; i < customersData.length; i++) {
|
|
602
|
+
var customer = customersData[order[i]];
|
|
603
|
+
c.push(customer);
|
|
604
|
+
}
|
|
605
|
+
return c;
|
|
606
|
+
};
|
|
607
|
+
MapService.prototype.plotHistoryCustomer = function (customer) {
|
|
608
|
+
if (this.historyCustomerMarker)
|
|
609
|
+
this.setMarkersMap(null, null);
|
|
610
|
+
this.agentService.toggleMenu();
|
|
611
|
+
var marker = new google.maps.Marker({
|
|
612
|
+
position: this.getLatLng(customer.loc),
|
|
613
|
+
map: this.map,
|
|
614
|
+
animation: google.maps.Animation.DROP,
|
|
615
|
+
label: {
|
|
616
|
+
text: 'C',
|
|
617
|
+
color: '#FFF'
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
this.historyCustomerMarker = marker;
|
|
621
|
+
var directionsService = new google.maps.DirectionsService();
|
|
622
|
+
var directionsRenderer = new google.maps.DirectionsRenderer({
|
|
623
|
+
suppressMarkers: true
|
|
624
|
+
});
|
|
625
|
+
directionsRenderer.setMap(this.map);
|
|
626
|
+
var request = {
|
|
627
|
+
origin: this.myPosition,
|
|
628
|
+
destination: marker.getPosition(),
|
|
629
|
+
optimizeWaypoints: true,
|
|
630
|
+
travelMode: 'DRIVING'
|
|
631
|
+
};
|
|
632
|
+
directionsService.route(request, function (result, status) {
|
|
633
|
+
if (status == 'OK') {
|
|
634
|
+
directionsRenderer.setDirections(result);
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
this.historyCustomerDirections = directionsRenderer;
|
|
638
|
+
this.setMarkersMap(null, this.map);
|
|
639
|
+
return marker;
|
|
640
|
+
};
|
|
641
|
+
MapService.prototype.setMarkersMap = function (all, history) {
|
|
642
|
+
this.allCustomersMarkers.map(function (marker) {
|
|
643
|
+
marker.setMap(all);
|
|
644
|
+
});
|
|
645
|
+
this.allCustomersDirections.setMap(all);
|
|
646
|
+
this.historyCustomerMarker.setMap(history);
|
|
647
|
+
this.historyCustomerDirections.setMap(history);
|
|
648
|
+
};
|
|
649
|
+
return MapService;
|
|
650
|
+
}());
|
|
651
|
+
/** @nocollapse */ MapService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapService, deps: [{ token: AgentService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
652
|
+
/** @nocollapse */ MapService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapService, providedIn: 'root' });
|
|
653
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapService, decorators: [{
|
|
654
|
+
type: i0.Injectable,
|
|
655
|
+
args: [{
|
|
656
|
+
providedIn: 'root'
|
|
657
|
+
}]
|
|
658
|
+
}], ctorParameters: function () { return [{ type: AgentService }]; } });
|
|
659
|
+
|
|
660
|
+
var CustomerService = /** @class */ (function () {
|
|
661
|
+
function CustomerService() {
|
|
662
|
+
}
|
|
663
|
+
CustomerService.prototype.getCustomers = function () {
|
|
664
|
+
return this.customersData;
|
|
665
|
+
};
|
|
666
|
+
CustomerService.prototype.setCustomers = function (customers) {
|
|
667
|
+
this.customersData = customers;
|
|
668
|
+
};
|
|
669
|
+
return CustomerService;
|
|
670
|
+
}());
|
|
671
|
+
/** @nocollapse */ CustomerService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
672
|
+
/** @nocollapse */ CustomerService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerService, providedIn: 'root' });
|
|
673
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerService, decorators: [{
|
|
674
|
+
type: i0.Injectable,
|
|
675
|
+
args: [{
|
|
676
|
+
providedIn: 'root'
|
|
677
|
+
}]
|
|
678
|
+
}], ctorParameters: function () { return []; } });
|
|
679
|
+
|
|
680
|
+
var MenuComponent = /** @class */ (function () {
|
|
681
|
+
/**
|
|
682
|
+
* @description
|
|
683
|
+
*
|
|
684
|
+
* @constructor
|
|
685
|
+
*/
|
|
686
|
+
function MenuComponent(agentService) {
|
|
687
|
+
this.agentService = agentService;
|
|
688
|
+
this.nextStep = new i0.EventEmitter();
|
|
689
|
+
}
|
|
690
|
+
MenuComponent.prototype.ngOnInit = function () { };
|
|
691
|
+
MenuComponent.prototype.goToNextStep = function (e) {
|
|
692
|
+
this.nextStep.emit(e);
|
|
693
|
+
};
|
|
694
|
+
MenuComponent.prototype.refresh = function () {
|
|
695
|
+
window.location.reload();
|
|
696
|
+
};
|
|
697
|
+
return MenuComponent;
|
|
698
|
+
}());
|
|
699
|
+
/** @nocollapse */ MenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MenuComponent, deps: [{ token: AgentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
700
|
+
/** @nocollapse */ MenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MenuComponent, selector: "menu", outputs: { nextStep: "nextStep" }, ngImport: i0__namespace, template: "<div class=\"menu-container\">\n <div class=\"menu-option\">\n <div class=\"agent-name\">Agent Name</div>\n <div class=\"agent-id\">1234-5678-9012</div>\n </div>\n <hr />\n <div class=\"menu-option\" (click)=\"agentService.toggleMapview()\">\n {{ agentService.showMapview ? 'Hide Maps' : 'Show Maps' }}\n </div>\n <div class=\"menu-option\" (click)=\"agentService.setAddTask(true)\">\n Add Task\n </div>\n <div class=\"menu-option\" (click)=\"refresh()\">Refresh</div>\n <hr />\n <div class=\"menu-option\" (onClick)=\"goToNextStep('logout')\">Logout</div>\n</div>\n", styles: [".menu-container{position:absolute;top:8%;right:0;background-color:#fafafa;width:-moz-fit-content;width:fit-content;border-radius:1rem;z-index:1001;box-shadow:0 4px 8px #0000001a;transition:\"0.15s linear 0s\"}.t-wrapper{padding:1.25rem!important}.agent-name{font-size:.9rem;font-weight:600}.agent-id{font-size:.7rem}.menu-option{padding:.25rem 1.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}hr{border:none!important;background-color:#ddd}\n"] });
|
|
701
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MenuComponent, decorators: [{
|
|
702
|
+
type: i0.Component,
|
|
703
|
+
args: [{
|
|
704
|
+
selector: 'menu',
|
|
705
|
+
templateUrl: './menu.component.html',
|
|
706
|
+
styleUrls: ['./menu.component.css']
|
|
707
|
+
}]
|
|
708
|
+
}], ctorParameters: function () { return [{ type: AgentService }]; }, propDecorators: { nextStep: [{
|
|
709
|
+
type: i0.Output
|
|
710
|
+
}] } });
|
|
711
|
+
|
|
712
|
+
var InfoWindowService = /** @class */ (function () {
|
|
713
|
+
function InfoWindowService(mapService) {
|
|
714
|
+
this.mapService = mapService;
|
|
715
|
+
this.config = {
|
|
716
|
+
fields: {
|
|
717
|
+
name: {
|
|
718
|
+
label: 'Name',
|
|
719
|
+
value: 'name',
|
|
720
|
+
display: 'value',
|
|
721
|
+
style: {
|
|
722
|
+
fontSize: '1rem',
|
|
723
|
+
fontWeight: 600
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
phone: {
|
|
727
|
+
label: 'Call',
|
|
728
|
+
value: 'phone',
|
|
729
|
+
display: 'label',
|
|
730
|
+
style: {
|
|
731
|
+
fontSize: '0.8rem',
|
|
732
|
+
padding: '0.1rem 0',
|
|
733
|
+
textAlign: 'justify'
|
|
734
|
+
},
|
|
735
|
+
icon: 'https://cdn-icons-png.flaticon.com/512/60/60720.png'
|
|
736
|
+
},
|
|
737
|
+
address: {
|
|
738
|
+
label: 'Directions',
|
|
739
|
+
value: 'address',
|
|
740
|
+
display: 'label',
|
|
741
|
+
style: {
|
|
742
|
+
fontSize: '0.8rem',
|
|
743
|
+
padding: '0.1rem 0'
|
|
744
|
+
},
|
|
745
|
+
icon: 'https://cdn-icons-png.flaticon.com/512/62/62516.png'
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
this.mainInfoWindowStyle = {
|
|
750
|
+
display: 'flex',
|
|
751
|
+
'flex-direction': 'column',
|
|
752
|
+
'justify-content': 'center',
|
|
753
|
+
'align-items': 'stretch',
|
|
754
|
+
gap: '0.5rem',
|
|
755
|
+
padding: '0.5rem'
|
|
756
|
+
};
|
|
757
|
+
this.fieldDivStyle = {
|
|
758
|
+
gap: ' 0.5rem',
|
|
759
|
+
display: 'flex',
|
|
760
|
+
'flex-direction': 'row'
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
InfoWindowService.prototype.getOpenMarker = function () {
|
|
764
|
+
return this.openMarker;
|
|
765
|
+
};
|
|
766
|
+
InfoWindowService.prototype.setOpenMarker = function (value) {
|
|
767
|
+
this.openMarker = value;
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* @description
|
|
771
|
+
* Wrapper method to show Customer Info Window
|
|
772
|
+
*
|
|
773
|
+
* @function showInfo
|
|
774
|
+
* @func showInfo
|
|
775
|
+
* @method showInfo
|
|
776
|
+
*/
|
|
777
|
+
InfoWindowService.prototype.showCustomerInformation = function (customer, marker) {
|
|
778
|
+
var map = this.mapService.getMap();
|
|
779
|
+
var contentString = this.createInfoContent(customer);
|
|
780
|
+
var infowindow = new google.maps.InfoWindow({
|
|
781
|
+
content: contentString
|
|
782
|
+
});
|
|
783
|
+
this.addEventListeners(customer, infowindow);
|
|
784
|
+
this.closeLastOpenedInfoWindow();
|
|
785
|
+
infowindow.open(map, marker);
|
|
786
|
+
this.lastInfoWindowOpened = infowindow;
|
|
787
|
+
map.setCenter(marker.getPosition());
|
|
788
|
+
return { infowindow: infowindow };
|
|
789
|
+
};
|
|
790
|
+
InfoWindowService.prototype.addEventListeners = function (customer, infowindow) {
|
|
791
|
+
var addressLink = "http://maps.google.com/?q=" + customer.extras.loc[0] + ", " + customer.extras.loc[1];
|
|
792
|
+
google.maps.event.addListener(infowindow, 'domready', function () {
|
|
793
|
+
document.getElementById('Call').addEventListener('click', function (e) {
|
|
794
|
+
window.open("tel:" + customer.extras.phone, '_self');
|
|
795
|
+
});
|
|
796
|
+
document
|
|
797
|
+
.getElementById('Directions')
|
|
798
|
+
.addEventListener('click', function (e) {
|
|
799
|
+
window.open("" + addressLink, '_blank');
|
|
800
|
+
});
|
|
801
|
+
document
|
|
802
|
+
.getElementsByClassName('gm-ui-hover-effect')[0]
|
|
803
|
+
.setAttribute('style', ' background: none;\
|
|
804
|
+
display: block; \
|
|
805
|
+
border: 0px; \
|
|
806
|
+
margin: 0px; \
|
|
807
|
+
padding: 0px; \
|
|
808
|
+
text-transform: none; \
|
|
809
|
+
appearance: none; \
|
|
810
|
+
position: absolute; \
|
|
811
|
+
cursor: pointer; \
|
|
812
|
+
user-select: none; \
|
|
813
|
+
top: 0px; \
|
|
814
|
+
right: 0px; \
|
|
815
|
+
width: 30px; \
|
|
816
|
+
height: 30px; \
|
|
817
|
+
');
|
|
818
|
+
});
|
|
819
|
+
};
|
|
820
|
+
/**
|
|
821
|
+
* @description
|
|
822
|
+
* Wrapper method to close Last Info Window
|
|
823
|
+
*
|
|
824
|
+
* @function closeLastOpenedInfoWindow
|
|
825
|
+
* @func closeLastOpenedInfoWindow
|
|
826
|
+
* @method closeLastOpenedInfoWindow
|
|
827
|
+
*/
|
|
828
|
+
InfoWindowService.prototype.closeLastOpenedInfoWindow = function () {
|
|
829
|
+
if (this.lastInfoWindowOpened) {
|
|
830
|
+
this.lastInfoWindowOpened.close();
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* @description
|
|
835
|
+
* Closes the previously opened info window.
|
|
836
|
+
*
|
|
837
|
+
* @function infoData
|
|
838
|
+
* @func infoData
|
|
839
|
+
* @method infoData
|
|
840
|
+
*/
|
|
841
|
+
InfoWindowService.prototype.createInfoContent = function (customer) {
|
|
842
|
+
var content = "<div style='padding:4px; font-family: Manrope;' >";
|
|
843
|
+
content += this.createFields(customer, this.config.fields);
|
|
844
|
+
content += '</div>';
|
|
845
|
+
return content;
|
|
846
|
+
};
|
|
847
|
+
/**
|
|
848
|
+
* @description
|
|
849
|
+
* Wrapper method to create Fields Container
|
|
850
|
+
*
|
|
851
|
+
* @function createFields
|
|
852
|
+
* @func createFields
|
|
853
|
+
* @method createFields
|
|
854
|
+
*/
|
|
855
|
+
InfoWindowService.prototype.createFields = function (customer, fields) {
|
|
856
|
+
var e_1, _a;
|
|
857
|
+
var _div = document.createElement('div');
|
|
858
|
+
for (var property in this.mainInfoWindowStyle)
|
|
859
|
+
_div.style[property] = this.mainInfoWindowStyle[property];
|
|
860
|
+
try {
|
|
861
|
+
for (var _b = __values(Object.keys(fields)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
862
|
+
var key = _c.value;
|
|
863
|
+
var field = fields[key];
|
|
864
|
+
var _fieldDiv = document.createElement('div');
|
|
865
|
+
_fieldDiv.setAttribute('id', field.label);
|
|
866
|
+
for (var property in this.fieldDivStyle)
|
|
867
|
+
_fieldDiv.style[property] = this.fieldDivStyle[property];
|
|
868
|
+
for (var property in field.style)
|
|
869
|
+
_fieldDiv.style[property] = field.style[property];
|
|
870
|
+
var string = field.display == 'label' ? field.label : customer.extras[field.value];
|
|
871
|
+
if (field.icon) {
|
|
872
|
+
var _icon = document.createElement('img');
|
|
873
|
+
_icon.src = field.icon;
|
|
874
|
+
_icon.style.width = field.style.fontSize;
|
|
875
|
+
_icon.style.height = field.style.fontSize;
|
|
876
|
+
_fieldDiv.appendChild(_icon);
|
|
877
|
+
}
|
|
878
|
+
var _fieldText = document.createElement('div');
|
|
879
|
+
_fieldText.innerHTML = string;
|
|
880
|
+
_fieldDiv.appendChild(_fieldText);
|
|
881
|
+
_div.appendChild(_fieldDiv);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
885
|
+
finally {
|
|
886
|
+
try {
|
|
887
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
888
|
+
}
|
|
889
|
+
finally { if (e_1) throw e_1.error; }
|
|
890
|
+
}
|
|
891
|
+
return _div.outerHTML;
|
|
892
|
+
};
|
|
893
|
+
return InfoWindowService;
|
|
894
|
+
}());
|
|
895
|
+
/** @nocollapse */ InfoWindowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoWindowService, deps: [{ token: MapService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
896
|
+
/** @nocollapse */ InfoWindowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoWindowService, providedIn: 'root' });
|
|
897
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoWindowService, decorators: [{
|
|
898
|
+
type: i0.Injectable,
|
|
899
|
+
args: [{
|
|
900
|
+
providedIn: 'root'
|
|
901
|
+
}]
|
|
902
|
+
}], ctorParameters: function () { return [{ type: MapService }]; } });
|
|
903
|
+
|
|
904
|
+
var KycSuccessComponent = /** @class */ (function () {
|
|
905
|
+
function KycSuccessComponent() {
|
|
906
|
+
}
|
|
907
|
+
KycSuccessComponent.prototype.ngOnInit = function () {
|
|
908
|
+
};
|
|
909
|
+
return KycSuccessComponent;
|
|
910
|
+
}());
|
|
911
|
+
/** @nocollapse */ KycSuccessComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KycSuccessComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
912
|
+
/** @nocollapse */ KycSuccessComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KycSuccessComponent, selector: "svg-kyc-success", ngImport: i0__namespace, template: "<svg\n class=\"status\"\n xmlns=\"http://www.w3.org/2000/svg\"\n x=\"0px\"\n y=\"0px\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0,0,256,256\"\n style=\"fill: #000000\"\n>\n <g transform=\"translate(64,64) scale(0.5,0.5)\">\n <g\n fill=\"#20c997\"\n fill-rule=\"nonzero\"\n stroke=\"none\"\n stroke-width=\"1\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"miter\"\n stroke-miterlimit=\"10\"\n stroke-dasharray=\"\"\n stroke-dashoffset=\"0\"\n font-family=\"none\"\n font-weight=\"none\"\n font-size=\"none\"\n text-anchor=\"none\"\n style=\"mix-blend-mode: normal\"\n >\n <path d=\"M-128,384v-512h512v512z\" id=\"bgRectangle\"></path>\n </g>\n <g\n fill=\"#ffffff\"\n fill-rule=\"nonzero\"\n stroke=\"none\"\n stroke-width=\"1\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"miter\"\n stroke-miterlimit=\"10\"\n stroke-dasharray=\"\"\n stroke-dashoffset=\"0\"\n font-family=\"none\"\n font-weight=\"none\"\n font-size=\"none\"\n text-anchor=\"none\"\n style=\"mix-blend-mode: normal\"\n >\n <g transform=\"scale(8,8)\">\n <path\n d=\"M28.28125,6.28125l-17.28125,17.28125l-7.28125,-7.28125l-1.4375,1.4375l8,8l0.71875,0.6875l0.71875,-0.6875l18,-18z\"\n ></path>\n </g>\n </g>\n </g>\n</svg>\n", styles: [".status{border-radius:1.5rem}\n"] });
|
|
913
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KycSuccessComponent, decorators: [{
|
|
914
|
+
type: i0.Component,
|
|
915
|
+
args: [{
|
|
916
|
+
selector: 'svg-kyc-success',
|
|
917
|
+
templateUrl: './kyc-success.component.html',
|
|
918
|
+
styleUrls: ['./kyc-success.component.css']
|
|
919
|
+
}]
|
|
920
|
+
}], ctorParameters: function () { return []; } });
|
|
921
|
+
|
|
922
|
+
var KycPendingComponent = /** @class */ (function () {
|
|
923
|
+
function KycPendingComponent() {
|
|
924
|
+
}
|
|
925
|
+
KycPendingComponent.prototype.ngOnInit = function () {
|
|
926
|
+
};
|
|
927
|
+
return KycPendingComponent;
|
|
928
|
+
}());
|
|
929
|
+
/** @nocollapse */ KycPendingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KycPendingComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
930
|
+
/** @nocollapse */ KycPendingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KycPendingComponent, selector: "svg-kyc-pending", ngImport: i0__namespace, template: "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"status\"\n x=\"0px\"\n y=\"0px\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0,0,256,256\"\n style=\"fill: #000000\"\n>\n <g transform=\"translate(32,32) scale(0.75,0.75)\">\n <g\n fill=\"#fcb919\"\n fill-rule=\"nonzero\"\n stroke=\"none\"\n stroke-width=\"1\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"miter\"\n stroke-miterlimit=\"10\"\n stroke-dasharray=\"\"\n stroke-dashoffset=\"0\"\n font-family=\"none\"\n font-weight=\"none\"\n font-size=\"none\"\n text-anchor=\"none\"\n style=\"mix-blend-mode: normal\"\n >\n <path\n d=\"M-42.66667,298.66667v-341.33333h341.33333v341.33333z\"\n id=\"bgRectangle\"\n ></path>\n </g>\n <g\n fill=\"#ffffff\"\n fill-rule=\"nonzero\"\n stroke=\"none\"\n stroke-width=\"1\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"miter\"\n stroke-miterlimit=\"10\"\n stroke-dasharray=\"\"\n stroke-dashoffset=\"0\"\n font-family=\"none\"\n font-weight=\"none\"\n font-size=\"none\"\n text-anchor=\"none\"\n style=\"mix-blend-mode: normal\"\n >\n <g transform=\"scale(8,8)\">\n <path\n d=\"M16,4c-6.61719,0 -12,5.38281 -12,12c0,6.61719 5.38281,12 12,12c6.61719,0 12,-5.38281 12,-12c0,-6.61719 -5.38281,-12 -12,-12zM16,6c5.53516,0 10,4.46484 10,10c0,5.53516 -4.46484,10 -10,10c-5.53516,0 -10,-4.46484 -10,-10c0,-5.53516 4.46484,-10 10,-10zM15,8v9h7v-2h-5v-7z\"\n ></path>\n </g>\n </g>\n </g>\n</svg>\n", styles: [".status{border-radius:1.5rem}\n"] });
|
|
931
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KycPendingComponent, decorators: [{
|
|
932
|
+
type: i0.Component,
|
|
933
|
+
args: [{
|
|
934
|
+
selector: 'svg-kyc-pending',
|
|
935
|
+
templateUrl: './kyc-pending.component.html',
|
|
936
|
+
styleUrls: ['./kyc-pending.component.css']
|
|
937
|
+
}]
|
|
938
|
+
}], ctorParameters: function () { return []; } });
|
|
939
|
+
|
|
940
|
+
var CustomerTileComponent = /** @class */ (function () {
|
|
941
|
+
function CustomerTileComponent(mapService, infoWindowService) {
|
|
942
|
+
this.mapService = mapService;
|
|
943
|
+
this.infoWindowService = infoWindowService;
|
|
944
|
+
/**
|
|
945
|
+
* @description
|
|
946
|
+
* Determines Customer Data
|
|
947
|
+
*
|
|
948
|
+
* @default
|
|
949
|
+
* `{}`
|
|
950
|
+
*/
|
|
951
|
+
this.customer = {};
|
|
952
|
+
/**
|
|
953
|
+
* @description
|
|
954
|
+
* Determines Index of Customer Data in Customer List
|
|
955
|
+
*
|
|
956
|
+
* @default
|
|
957
|
+
*
|
|
958
|
+
*/
|
|
959
|
+
this.index = undefined;
|
|
960
|
+
/**
|
|
961
|
+
* @description
|
|
962
|
+
* Emitter to emit next Step
|
|
963
|
+
*
|
|
964
|
+
* @emits KwikIDAgentDashboardComponent#nextStep
|
|
965
|
+
* @fires KwikIDAgentDashboardComponent#nextStep
|
|
966
|
+
*/
|
|
967
|
+
this.nextStep = new i0.EventEmitter();
|
|
968
|
+
this.removeTask = new i0.EventEmitter(); /**
|
|
969
|
+
* @description
|
|
970
|
+
*
|
|
971
|
+
* @constructor
|
|
972
|
+
*/
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* @description
|
|
976
|
+
* To set Google Maps API on script
|
|
977
|
+
*
|
|
978
|
+
* @ngOnInit
|
|
979
|
+
*/
|
|
980
|
+
CustomerTileComponent.prototype.ngOnInit = function () { };
|
|
981
|
+
CustomerTileComponent.prototype.tileClick = function () {
|
|
982
|
+
console.log("Tile Click", this.index);
|
|
983
|
+
if (this.index == this.infoWindowService.getOpenMarker()) {
|
|
984
|
+
this.infoWindowService.setOpenMarker(null);
|
|
985
|
+
this.infoWindowService.lastInfoWindowOpened.close();
|
|
986
|
+
}
|
|
987
|
+
else {
|
|
988
|
+
this.showDetails(this.customer, this.index);
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
/**
|
|
992
|
+
* @description
|
|
993
|
+
* Wrapper method to show Customer Info Window
|
|
994
|
+
*
|
|
995
|
+
* @function showDetails
|
|
996
|
+
* @func showDetails
|
|
997
|
+
* @method showDetails
|
|
998
|
+
*/
|
|
999
|
+
CustomerTileComponent.prototype.showDetails = function (customer, index) {
|
|
1000
|
+
var markers = this.mapService.getMarkers();
|
|
1001
|
+
var marker = markers[index];
|
|
1002
|
+
var infowindow = this.infoWindowService.showCustomerInformation(customer, marker).infowindow;
|
|
1003
|
+
this.infoWindowService.setOpenMarker(index);
|
|
1004
|
+
};
|
|
1005
|
+
/**
|
|
1006
|
+
* @description
|
|
1007
|
+
* Wrapper method to fire click event for next step.
|
|
1008
|
+
*
|
|
1009
|
+
* @function goToNextStep
|
|
1010
|
+
* @func goToNextStep
|
|
1011
|
+
* @method goToNextStep
|
|
1012
|
+
*/
|
|
1013
|
+
CustomerTileComponent.prototype.goToNextStep = function (e) {
|
|
1014
|
+
this.nextStep.emit(e);
|
|
1015
|
+
};
|
|
1016
|
+
CustomerTileComponent.prototype.handleOnClickRemoveTask = function (task) {
|
|
1017
|
+
this.removeTask.emit(task);
|
|
1018
|
+
};
|
|
1019
|
+
return CustomerTileComponent;
|
|
1020
|
+
}());
|
|
1021
|
+
/** @nocollapse */ CustomerTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, deps: [{ token: MapService }, { token: InfoWindowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1022
|
+
/** @nocollapse */ CustomerTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index" }, outputs: { nextStep: "nextStep", removeTask: "removeTask" }, ngImport: i0__namespace, template: "<div class=\"customer-tile-wrapper\">\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <ng-container *ngIf=\"customer.kycComplete\">\n <svg-kyc-success></svg-kyc-success>\n </ng-container>\n <ng-container *ngIf=\"!customer.kycComplete\">\n <svg-kyc-pending></svg-kyc-pending>\n </ng-container>\n <div class=\"customer-tile-prtimary-container-name-phone\">\n <div class=\"customer-tile-primary-container-name\">\n {{ customer.extras.name }}\n </div>\n <div class=\"customer-tile-primary-container-phone\">\n {{ customer.extras.phone }}\n </div>\n </div>\n </div>\n <kwikui-button-icon\n [icon]=\"\n index == infoWindowService.getOpenMarker()\n ? 'tuiIconChevronUpLarge'\n : 'tuiIconChevronDownLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"tileClick()\"\n ></kwikui-button-icon>\n </div>\n <div\n [ngClass]=\"\n index == infoWindowService.getOpenMarker()\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <div class=\"customer-tile-secondary-container-address\">\n {{ customer.extras.address }}\n </div>\n </div>\n <div class=\"customer-tile-secondary-container-actions\">\n <kwikui-button-icon\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button-icon>\n <div class=\"customer-tile-secondary-container-journey-buttons\">\n <kwikui-button\n label=\"Share Link\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToNextStep({ customer: customer, process: 'share' })\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!customer.kycComplete\"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToNextStep({ customer: customer, process: 'kyc' })\"\n ></kwikui-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".customer-tile-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto;grid-gap:.5rem;gap:.5rem;padding:1rem;border-bottom:.5px solid #ddd}.customer-tile-wrapper .customer-tile-primary-container{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;width:100%;height:100%}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data{padding-left:.2rem;grid-gap:.6rem;gap:.6rem;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;justify-content:space-evenly;align-items:center}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-status{border-radius:1.5rem}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-name{font-weight:600;line-height:1rem}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-phone{font-size:.7rem}.customer-tile-wrapper .customer-tile-secondary-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data{padding:.4rem .2rem;display:flex;flex-direction:column;font-size:.6rem;grid-gap:.2rem;gap:.2rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-session-id{width:100%;height:100%;line-height:.9rem;text-align:justify}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-address{width:100%;height:100%;line-height:.9rem;text-align:justify}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons{padding-right:.2rem;display:flex;flex-direction:row;grid-gap:.8rem;gap:.8rem;align-items:center}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions .customer-tile-secondary-container-journey-buttons .customer-share-link{font-size:.7rem}.customer-tile-wrapper .data-collasped{display:none}\n"], components: [{ type: KycSuccessComponent, selector: "svg-kyc-success" }, { type: KycPendingComponent, selector: "svg-kyc-pending" }, { type: i5__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i5__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1023
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, decorators: [{
|
|
1024
|
+
type: i0.Component,
|
|
1025
|
+
args: [{
|
|
1026
|
+
selector: 'customer-tile',
|
|
1027
|
+
templateUrl: './customer-tile.component.html',
|
|
1028
|
+
styleUrls: ['./customer-tile.component.scss']
|
|
1029
|
+
}]
|
|
1030
|
+
}], ctorParameters: function () { return [{ type: MapService }, { type: InfoWindowService }]; }, propDecorators: { customer: [{
|
|
1031
|
+
type: i0.Input
|
|
1032
|
+
}], index: [{
|
|
1033
|
+
type: i0.Input
|
|
1034
|
+
}], nextStep: [{
|
|
1035
|
+
type: i0.Output
|
|
1036
|
+
}], removeTask: [{
|
|
1037
|
+
type: i0.Output
|
|
1038
|
+
}] } });
|
|
1039
|
+
|
|
1040
|
+
var CustomerListComponent = /** @class */ (function () {
|
|
1041
|
+
/**
|
|
1042
|
+
* @description
|
|
1043
|
+
*
|
|
1044
|
+
* @constructor
|
|
1045
|
+
*/
|
|
1046
|
+
function CustomerListComponent(mapService, infoWindowService) {
|
|
1047
|
+
this.mapService = mapService;
|
|
1048
|
+
this.infoWindowService = infoWindowService;
|
|
1049
|
+
/**
|
|
1050
|
+
* @description
|
|
1051
|
+
* Emitter to emit next Step
|
|
1052
|
+
*
|
|
1053
|
+
* @emits KwikIDAgentDashboardComponent#nextStep
|
|
1054
|
+
* @fires KwikIDAgentDashboardComponent#nextStep
|
|
1055
|
+
*/
|
|
1056
|
+
this.nextStep = new i0.EventEmitter();
|
|
1057
|
+
this.removeTask = new i0.EventEmitter();
|
|
1058
|
+
this.filteredData = [];
|
|
1059
|
+
this.formGroup = new i5$1.FormGroup({});
|
|
1060
|
+
this.fromDate = this.getDate();
|
|
1061
|
+
this.toDate = this.getDate();
|
|
1062
|
+
this.fromDateFormControl = new i5$1.FormControl({
|
|
1063
|
+
value: new cdk.TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()),
|
|
1064
|
+
disabled: false
|
|
1065
|
+
});
|
|
1066
|
+
this.formGroup.addControl('fromDate', this.fromDateFormControl);
|
|
1067
|
+
this.toDateFormControl = new i5$1.FormControl({
|
|
1068
|
+
value: new cdk.TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()),
|
|
1069
|
+
disabled: false
|
|
1070
|
+
});
|
|
1071
|
+
this.formGroup.addControl('toDate', this.toDateFormControl);
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* @description
|
|
1075
|
+
* To set Google Maps API on script
|
|
1076
|
+
*
|
|
1077
|
+
* @ngOnInit
|
|
1078
|
+
*/
|
|
1079
|
+
CustomerListComponent.prototype.ngOnInit = function () {
|
|
1080
|
+
this.filteredData = this.getCustomers(this.customers);
|
|
1081
|
+
};
|
|
1082
|
+
/**
|
|
1083
|
+
* @description
|
|
1084
|
+
* Wrapper method to fire click event for next step.
|
|
1085
|
+
*
|
|
1086
|
+
* @function goToNextStep
|
|
1087
|
+
* @func goToNextStep
|
|
1088
|
+
* @method goToNextStep
|
|
1089
|
+
*/
|
|
1090
|
+
CustomerListComponent.prototype.goToNextStep = function (e) {
|
|
1091
|
+
this.nextStep.emit(e);
|
|
1092
|
+
};
|
|
1093
|
+
CustomerListComponent.prototype.getDate = function () {
|
|
1094
|
+
var date = new Date();
|
|
1095
|
+
var year = date.getFullYear();
|
|
1096
|
+
var month = date.getMonth() + 1;
|
|
1097
|
+
var day = date.getDate();
|
|
1098
|
+
if (month < 10)
|
|
1099
|
+
month = '0' + month;
|
|
1100
|
+
if (day < 10)
|
|
1101
|
+
day = '0' + day;
|
|
1102
|
+
var today = year + "-" + month + "-" + day;
|
|
1103
|
+
return today;
|
|
1104
|
+
};
|
|
1105
|
+
CustomerListComponent.prototype.getCustomers = function (customers) {
|
|
1106
|
+
var _this = this;
|
|
1107
|
+
var filterData = customers.filter(function (customer) {
|
|
1108
|
+
var date = customer.date;
|
|
1109
|
+
return date >= _this.fromDate && date <= _this.toDate;
|
|
1110
|
+
});
|
|
1111
|
+
return filterData;
|
|
1112
|
+
};
|
|
1113
|
+
CustomerListComponent.prototype.onFromDateChange = function (event) {
|
|
1114
|
+
var year = event.value.year;
|
|
1115
|
+
var month = event.value.month + 1;
|
|
1116
|
+
var date = event.value.day;
|
|
1117
|
+
month = month < 10 ? '0' + month : month;
|
|
1118
|
+
date = date < 10 ? '0' + date : date;
|
|
1119
|
+
this.fromDate = year + "-" + month + "-" + date;
|
|
1120
|
+
this.filteredData = this.getCustomers(this.customers);
|
|
1121
|
+
};
|
|
1122
|
+
CustomerListComponent.prototype.onToDateChange = function (event) {
|
|
1123
|
+
var year = event.value.year;
|
|
1124
|
+
var month = event.value.month + 1;
|
|
1125
|
+
var date = event.value.day;
|
|
1126
|
+
month = month < 10 ? '0' + month : month;
|
|
1127
|
+
date = date < 10 ? '0' + date : date;
|
|
1128
|
+
this.toDate = year + "-" + month + "-" + date;
|
|
1129
|
+
this.filteredData = this.getCustomers(this.customers);
|
|
1130
|
+
};
|
|
1131
|
+
CustomerListComponent.prototype.handleOnClickRemoveTask = function (task) {
|
|
1132
|
+
this.removeTask.emit(task);
|
|
1133
|
+
};
|
|
1134
|
+
return CustomerListComponent;
|
|
1135
|
+
}());
|
|
1136
|
+
/** @nocollapse */ CustomerListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, deps: [{ token: MapService }, { token: InfoWindowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1137
|
+
/** @nocollapse */ CustomerListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers" }, outputs: { nextStep: "nextStep", removeTask: "removeTask" }, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date\n [label]=\"'From Date'\"\n [id]=\"'fromDate'\"\n size=\"m\"\n [formControlName]=\"'fromDate'\"\n [formControl]=\"fromDateFormControl\"\n (getKeyValue)=\"onFromDateChange($event)\"\n ></kwikui-input-date>\n <kwikui-input-date\n [label]=\"'To Date'\"\n [id]=\"'toDate'\"\n size=\"m\"\n [formControlName]=\"'toDate'\"\n [formControl]=\"toDateFormControl\"\n (getKeyValue)=\"onToDateChange($event)\"\n ></kwikui-input-date>\n </div>\n <div class=\"customer-task-list\">\n <div *ngFor=\"let customer of filteredData; let index = index\">\n <customer-tile\n [customer]=\"customer\"\n [index]=\"index\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"customers.length === 0\">\n No Customers Left...\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto}.customer-list-filter{height:80px;width:100%;display:flex;flex-direction:row;padding:1rem;grid-gap:1rem;gap:1rem;border-bottom:.5px solid #ddd}.customer-list-filter>*{width:100%}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i5__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "min", "max", "validators", "properties"], outputs: ["getKeyValue"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index"], outputs: ["nextStep", "removeTask"] }], directives: [{ type: i5__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1138
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, decorators: [{
|
|
1139
|
+
type: i0.Component,
|
|
1140
|
+
args: [{
|
|
1141
|
+
selector: 'customer-list',
|
|
1142
|
+
templateUrl: './customer-list.component.html',
|
|
1143
|
+
styleUrls: ['./customer-list.component.css']
|
|
1144
|
+
}]
|
|
1145
|
+
}], ctorParameters: function () { return [{ type: MapService }, { type: InfoWindowService }]; }, propDecorators: { customers: [{
|
|
1146
|
+
type: i0.Input
|
|
1147
|
+
}], nextStep: [{
|
|
1148
|
+
type: i0.Output
|
|
1149
|
+
}], removeTask: [{
|
|
1150
|
+
type: i0.Output
|
|
1151
|
+
}] } });
|
|
1152
|
+
|
|
1153
|
+
var AddCustomerComponent = /** @class */ (function () {
|
|
1154
|
+
function AddCustomerComponent(agentService) {
|
|
1155
|
+
this.agentService = agentService;
|
|
1156
|
+
this.newCustomerFormGroup = undefined;
|
|
1157
|
+
this.addTask = new i0.EventEmitter();
|
|
1158
|
+
this.newCustomerFormGroup = new i5$1.FormGroup({
|
|
1159
|
+
name: new i5$1.FormControl(''),
|
|
1160
|
+
phone: new i5$1.FormControl(''),
|
|
1161
|
+
address: new i5$1.FormControl('')
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
AddCustomerComponent.prototype.ngOnInit = function () { };
|
|
1165
|
+
AddCustomerComponent.prototype.handleGetKeyValue = function (e) {
|
|
1166
|
+
var _a;
|
|
1167
|
+
this.newCustomerFormGroup.patchValue((_a = {},
|
|
1168
|
+
_a[e.key] = e.value,
|
|
1169
|
+
_a), { emitEvent: false });
|
|
1170
|
+
};
|
|
1171
|
+
AddCustomerComponent.prototype.handleOnClickAddTask = function (e) {
|
|
1172
|
+
var newTask = {};
|
|
1173
|
+
newTask = {
|
|
1174
|
+
user_id: String(Math.floor(1000 + Math.random() * 9000)),
|
|
1175
|
+
date: this.getDate(),
|
|
1176
|
+
extras: {
|
|
1177
|
+
name: this.newCustomerFormGroup.controls.name.value,
|
|
1178
|
+
phone: this.newCustomerFormGroup.controls.phone.value,
|
|
1179
|
+
address: this.newCustomerFormGroup.controls.address.value,
|
|
1180
|
+
map: 'https: //www.google.com/maps/place/Westside+-+Borivali,+Mumbai/@19.2288067,72.853972,17z/data=!3m1!5s0x3be7b0d65d0d02dd:0x2bf11ace42a9dad8!4m12!1m6!3m5!1s0x3be7b0d6db21ad03:0xa31af1578987d699!2sBorivali+Station+West!8m2!3d19.2288016!4d72.8561607!3m4!1s0x3be7b12a0f616a41:0x1f4e031b07f5726c!8m2!3d19.2291309!4d72.8523105',
|
|
1181
|
+
loc: ['19.2288067', '72.853972']
|
|
1182
|
+
},
|
|
1183
|
+
kycComplete: false
|
|
1184
|
+
};
|
|
1185
|
+
this.addTask.emit(newTask);
|
|
1186
|
+
this.agentService.setAddTask(false);
|
|
1187
|
+
};
|
|
1188
|
+
AddCustomerComponent.prototype.getDate = function () {
|
|
1189
|
+
var date = new Date();
|
|
1190
|
+
var year = date.getFullYear();
|
|
1191
|
+
var month = date.getMonth() + 1;
|
|
1192
|
+
var day = date.getDate();
|
|
1193
|
+
if (month < 10)
|
|
1194
|
+
month = '0' + month;
|
|
1195
|
+
if (day < 10)
|
|
1196
|
+
day = '0' + day;
|
|
1197
|
+
var today = year + "-" + month + "-" + day;
|
|
1198
|
+
return today;
|
|
1199
|
+
};
|
|
1200
|
+
return AddCustomerComponent;
|
|
1201
|
+
}());
|
|
1202
|
+
/** @nocollapse */ AddCustomerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AddCustomerComponent, deps: [{ token: AgentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1203
|
+
/** @nocollapse */ AddCustomerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AddCustomerComponent, selector: "add-customer", outputs: { addTask: "addTask" }, ngImport: i0__namespace, template: "<div class=\"add-customer-container\">\n <div class=\"add-customer-form\">\n <div class=\"add-customer-form-content\" [formGroup]=\"newCustomerFormGroup\">\n <div class=\"add-customer-heading\">Add Task</div>\n <kwikui-input\n type=\"text\"\n label=\"Name\"\n id=\"name\"\n size=\"m\"\n [formControlName]=\"'name'\"\n [formControl]=\"newCustomerFormGroup.controls['name']\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-input\n type=\"text\"\n label=\"Phone\"\n id=\"phone\"\n size=\"m\"\n [formControlName]=\"'phone'\"\n [formControl]=\"newCustomerFormGroup.controls['phone']\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-input\n type=\"text\"\n label=\"Address\"\n id=\"address\"\n size=\"m\"\n [formControlName]=\"'address'\"\n [formControl]=\"newCustomerFormGroup.controls['address']\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <div class=\"add-customer-form-actions\">\n <kwikui-button\n label=\"Cancel\"\n appearance=\"flat\"\n size=\"m\"\n (onClick)=\"agentService.setAddTask(false)\"\n ></kwikui-button>\n <kwikui-button\n label=\"Submit\"\n appearance=\"primary\"\n size=\"m\"\n (onClick)=\"handleOnClickAddTask($event)\"\n ></kwikui-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".add-customer-container{position:absolute;background-color:#0000004d;width:100%;height:100%;display:flex;top:0;right:0;justify-content:center;align-items:center}.add-customer-form{width:75%;height:75%;margin:auto;background-color:#fff;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.add-customer-form-content{display:flex;flex-direction:column;width:100%;height:100%;align-items:stretch;grid-gap:2rem;gap:2rem;padding:2rem}.add-customer-heading{font-size:1.3rem;font-weight:600;padding:1rem 0;border-bottom:1px solid #ddd}.add-customer-form-actions{display:flex;flex-direction:row;align-content:stretch;justify-content:flex-end}\n"], components: [{ type: i5__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "properties"], outputs: ["getKeyValue"] }, { type: i5__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1204
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AddCustomerComponent, decorators: [{
|
|
1205
|
+
type: i0.Component,
|
|
1206
|
+
args: [{
|
|
1207
|
+
selector: 'add-customer',
|
|
1208
|
+
templateUrl: './add-customer.component.html',
|
|
1209
|
+
styleUrls: ['./add-customer.component.css']
|
|
1210
|
+
}]
|
|
1211
|
+
}], ctorParameters: function () { return [{ type: AgentService }]; }, propDecorators: { addTask: [{
|
|
1212
|
+
type: i0.Output
|
|
1213
|
+
}] } });
|
|
1214
|
+
|
|
1215
|
+
var KwikIDAgentDashboardComponent = /** @class */ (function () {
|
|
1216
|
+
/**
|
|
1217
|
+
* @description
|
|
1218
|
+
*
|
|
1219
|
+
* @constructor
|
|
1220
|
+
*/
|
|
1221
|
+
function KwikIDAgentDashboardComponent(agentService, mapService, customerService) {
|
|
1222
|
+
this.agentService = agentService;
|
|
1223
|
+
this.mapService = mapService;
|
|
1224
|
+
this.customerService = customerService;
|
|
1225
|
+
/**
|
|
1226
|
+
* @description
|
|
1227
|
+
* Stores agent Config
|
|
1228
|
+
*
|
|
1229
|
+
* @default
|
|
1230
|
+
* `{}`
|
|
1231
|
+
*/
|
|
1232
|
+
this.agentConfig = {};
|
|
1233
|
+
/**
|
|
1234
|
+
* @description
|
|
1235
|
+
* Stores list of customers
|
|
1236
|
+
*
|
|
1237
|
+
* @default
|
|
1238
|
+
* `[]`
|
|
1239
|
+
*/
|
|
1240
|
+
this.customers = [];
|
|
1241
|
+
/**
|
|
1242
|
+
* @description
|
|
1243
|
+
* Stores list of customers
|
|
1244
|
+
*
|
|
1245
|
+
* @default
|
|
1246
|
+
* `[]`
|
|
1247
|
+
*/
|
|
1248
|
+
this.todaysCustomers = [];
|
|
1249
|
+
/**
|
|
1250
|
+
* @description
|
|
1251
|
+
* Emitter to emit next Step
|
|
1252
|
+
*
|
|
1253
|
+
* @emits KwikIDAgentDashboardComponent#nextStep
|
|
1254
|
+
* @fires KwikIDAgentDashboardComponent#nextStep
|
|
1255
|
+
*/
|
|
1256
|
+
this.nextStep = new i0.EventEmitter();
|
|
1257
|
+
this.addTask = new i0.EventEmitter();
|
|
1258
|
+
this.removeTask = new i0.EventEmitter();
|
|
1259
|
+
/**
|
|
1260
|
+
* @description
|
|
1261
|
+
* Describes whether API Call is in progress or not
|
|
1262
|
+
*
|
|
1263
|
+
* @default
|
|
1264
|
+
* `true`
|
|
1265
|
+
*/
|
|
1266
|
+
this.loading = true;
|
|
1267
|
+
/**
|
|
1268
|
+
* @description
|
|
1269
|
+
* Describes styling of Map Container
|
|
1270
|
+
*
|
|
1271
|
+
* @default
|
|
1272
|
+
* `object`
|
|
1273
|
+
*/
|
|
1274
|
+
this.mapStyle = { height: '100%', width: '100%', zIindex: -1 };
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* @description
|
|
1278
|
+
* To set Google Maps API on script
|
|
1279
|
+
*
|
|
1280
|
+
* @ngOnInit
|
|
1281
|
+
*/
|
|
1282
|
+
KwikIDAgentDashboardComponent.prototype.ngOnInit = function () {
|
|
1283
|
+
var _this = this;
|
|
1284
|
+
var DSLScript = document.createElement('script');
|
|
1285
|
+
DSLScript.src = this.agentConfig.googleMapsAPI;
|
|
1286
|
+
DSLScript.type = 'text/javascript';
|
|
1287
|
+
document.body.appendChild(DSLScript);
|
|
1288
|
+
this.loading = false;
|
|
1289
|
+
this.agentService.setAgentConfig(this.agentConfig);
|
|
1290
|
+
this.customerService.setCustomers(this.customers);
|
|
1291
|
+
this.todaysCustomers = this.customers.filter(function (customer) { return customer.date == _this.getDate(); });
|
|
1292
|
+
this.agentConfig.showMaps == true || this.agentConfig.showMaps == false
|
|
1293
|
+
? this.agentService.setMapview(this.agentConfig.showMaps)
|
|
1294
|
+
: null;
|
|
1295
|
+
};
|
|
1296
|
+
/**
|
|
1297
|
+
* @description
|
|
1298
|
+
*
|
|
1299
|
+
* @ngAfterViewInit
|
|
1300
|
+
*/
|
|
1301
|
+
KwikIDAgentDashboardComponent.prototype.ngAfterViewInit = function () {
|
|
1302
|
+
var _this = this;
|
|
1303
|
+
setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1304
|
+
var _a;
|
|
1305
|
+
return __generator(this, function (_b) {
|
|
1306
|
+
switch (_b.label) {
|
|
1307
|
+
case 0: return [4 /*yield*/, this.mapService.initMap(this.mapElement)];
|
|
1308
|
+
case 1:
|
|
1309
|
+
_b.sent();
|
|
1310
|
+
_a = this;
|
|
1311
|
+
return [4 /*yield*/, this.mapService.plotMarkers(this.todaysCustomers)];
|
|
1312
|
+
case 2:
|
|
1313
|
+
_a.todaysCustomers = _b.sent();
|
|
1314
|
+
return [2 /*return*/];
|
|
1315
|
+
}
|
|
1316
|
+
});
|
|
1317
|
+
}); }, 1000);
|
|
1318
|
+
};
|
|
1319
|
+
/**
|
|
1320
|
+
* @description
|
|
1321
|
+
* Wrapper method to fire click event for next step.
|
|
1322
|
+
*
|
|
1323
|
+
* @function goToNextStep
|
|
1324
|
+
* @func goToNextStep
|
|
1325
|
+
* @method goToNextStep
|
|
1326
|
+
*/
|
|
1327
|
+
KwikIDAgentDashboardComponent.prototype.goToNextStep = function (e) {
|
|
1328
|
+
this.nextStep.emit(e);
|
|
1329
|
+
};
|
|
1330
|
+
/**
|
|
1331
|
+
* @description
|
|
1332
|
+
* Wrapper method to fire click event for next step.
|
|
1333
|
+
*
|
|
1334
|
+
* @function getDate
|
|
1335
|
+
* @func getDate
|
|
1336
|
+
* @method getDate
|
|
1337
|
+
*/
|
|
1338
|
+
KwikIDAgentDashboardComponent.prototype.getDate = function () {
|
|
1339
|
+
var date = new Date();
|
|
1340
|
+
var year = date.getFullYear();
|
|
1341
|
+
var month = date.getMonth() + 1;
|
|
1342
|
+
var day = date.getDate();
|
|
1343
|
+
if (month < 10)
|
|
1344
|
+
month = '0' + month;
|
|
1345
|
+
if (day < 10)
|
|
1346
|
+
day = '0' + day;
|
|
1347
|
+
var today = year + "-" + month + "-" + day;
|
|
1348
|
+
return today;
|
|
1349
|
+
};
|
|
1350
|
+
KwikIDAgentDashboardComponent.prototype.handleOnClickAddTask = function (task) {
|
|
1351
|
+
this.addTask.emit(task);
|
|
1352
|
+
};
|
|
1353
|
+
KwikIDAgentDashboardComponent.prototype.handleOnClickRemoveTask = function (task) {
|
|
1354
|
+
this.removeTask.emit(task);
|
|
1355
|
+
};
|
|
1356
|
+
return KwikIDAgentDashboardComponent;
|
|
1357
|
+
}());
|
|
1358
|
+
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, deps: [{ token: AgentService }, { token: MapService }, { token: CustomerService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1359
|
+
/** @nocollapse */ KwikIDAgentDashboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDAgentDashboardComponent, selector: "kwikid-agent-dashboard", inputs: { agentConfig: "agentConfig", customers: "customers", todaysCustomers: "todaysCustomers" }, outputs: { nextStep: "nextStep", addTask: "addTask", removeTask: "removeTask" }, viewQueries: [{ propertyName: "mapElement", first: true, predicate: ["mapElement"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"kwikid-agent-dashboard\">\n <div ngClass=\"page-loader\" *ngIf=\"loading\">\n <span class=\"loader\"></span>\n </div>\n <div class=\"wrapper\">\n <div class=\"dashboard-header\">\n <div class=\"dashboard-header-client-name\">\n <kwikui-button-icon\n [icon]=\"'tuiIconLink'\"\n appearance=\"mono\"\n size=\"m\"\n ></kwikui-button-icon>\n\n {{ agentConfig.clientName }}\n </div>\n <div *ngIf=\"agentService.getMenu()\">\n <menu\n (close)=\"agentService.setMenu(false)\"\n (nextStep)=\"goToNextStep($event)\"\n ></menu>\n </div>\n <kwikui-button-icon\n [icon]=\"'tuiIconMoreVertical'\"\n (onClick)=\"agentService.toggleMenu()\"\n appearance=\"mono\"\n size=\"m\"\n ></kwikui-button-icon>\n </div>\n\n <div class=\"dashboard-body\">\n <div\n [class]=\"agentService.showMapview ? 'map' : 'map-hidden'\"\n #mapElement\n ></div>\n <div class=\"customer-list\">\n <customer-list\n [customers]=\"customers\"\n (nextStep)=\"goToNextStep($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-list>\n </div>\n </div>\n </div>\n <div *ngIf=\"agentService.getAddTask()\">\n <add-customer (addTask)=\"handleOnClickAddTask($event)\"></add-customer>\n </div>\n</div>\n", styles: [".kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%;position:relative}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper .dashboard-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:max-content;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;font-weight:600}.kwikid-agent-dashboard .wrapper .dashboard-body{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{width:100%;height:100%;background-color:#fafafa;overflow:hidden}@media screen and (min-width: 600px){.kwikid-agent-dashboard{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-agent-dashboard .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.kwikid-agent-dashboard .wrapper .dashboard-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:.2rem;max-height:max-content;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.kwikid-agent-dashboard .wrapper .dashboard-header .dashboard-header-client-name{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;font-size:1rem;font-weight:600}.kwikid-agent-dashboard .wrapper .dashboard-body{display:flex;flex-direction:row-reverse;align-content:center;justify-content:center;align-items:stretch;padding:1.5rem;grid-gap:1.5rem;gap:1.5rem;overflow:auto;background-color:#fafafa}.kwikid-agent-dashboard .wrapper .dashboard-body .map{width:100%;height:100%;position:relative;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}.kwikid-agent-dashboard .wrapper .dashboard-body .map-hidden{visibility:collapse}.kwikid-agent-dashboard .wrapper .dashboard-body .customer-list{min-width:300px;max-width:300px;width:100%;height:100%;overflow:hidden;box-shadow:#0000001a 0 4px 6px -1px,#0000000f 0 2px 4px -1px;border-radius:.5rem}}.menu{position:absolute;transition:\"0.15s linear 0s\"}.page-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.page-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.page-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.page-loader .t-loader{display:none!important}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i5__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: MenuComponent, selector: "menu", outputs: ["nextStep"] }, { type: CustomerListComponent, selector: "customer-list", inputs: ["customers"], outputs: ["nextStep", "removeTask"] }, { type: AddCustomerComponent, selector: "add-customer", outputs: ["addTask"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1360
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardComponent, decorators: [{
|
|
1361
|
+
type: i0.Component,
|
|
1362
|
+
args: [{
|
|
1363
|
+
selector: 'kwikid-agent-dashboard',
|
|
1364
|
+
templateUrl: './kwikid-agent-dashboard.component.html',
|
|
1365
|
+
styleUrls: ['./kwikid-agent-dashboard.component.scss']
|
|
1366
|
+
}]
|
|
1367
|
+
}], ctorParameters: function () { return [{ type: AgentService }, { type: MapService }, { type: CustomerService }]; }, propDecorators: { agentConfig: [{
|
|
1368
|
+
type: i0.Input
|
|
1369
|
+
}], customers: [{
|
|
1370
|
+
type: i0.Input
|
|
1371
|
+
}], todaysCustomers: [{
|
|
1372
|
+
type: i0.Input
|
|
1373
|
+
}], nextStep: [{
|
|
1374
|
+
type: i0.Output
|
|
1375
|
+
}], addTask: [{
|
|
1376
|
+
type: i0.Output
|
|
1377
|
+
}], removeTask: [{
|
|
1378
|
+
type: i0.Output
|
|
1379
|
+
}], mapElement: [{
|
|
1380
|
+
type: i0.ViewChild,
|
|
1381
|
+
args: ['mapElement']
|
|
1382
|
+
}] } });
|
|
1383
|
+
|
|
1384
|
+
var KwikIDAgentDashboardModule = /** @class */ (function () {
|
|
1385
|
+
function KwikIDAgentDashboardModule() {
|
|
1386
|
+
}
|
|
1387
|
+
return KwikIDAgentDashboardModule;
|
|
1388
|
+
}());
|
|
1389
|
+
/** @nocollapse */ KwikIDAgentDashboardModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1390
|
+
/** @nocollapse */ KwikIDAgentDashboardModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardModule, declarations: [KwikIDAgentDashboardComponent,
|
|
1391
|
+
CustomerListComponent,
|
|
1392
|
+
CustomerTileComponent,
|
|
1393
|
+
MenuComponent,
|
|
1394
|
+
KycSuccessComponent,
|
|
1395
|
+
KycPendingComponent,
|
|
1396
|
+
AddCustomerComponent], imports: [i6.CommonModule,
|
|
1397
|
+
http.HttpClientModule,
|
|
1398
|
+
i5$1.FormsModule,
|
|
1399
|
+
i5$1.ReactiveFormsModule,
|
|
1400
|
+
testing.RouterTestingModule,
|
|
1401
|
+
i5.KwikUIButtonModule,
|
|
1402
|
+
i5.KwikUIButtonIconModule,
|
|
1403
|
+
i5.KwikUIInputModule,
|
|
1404
|
+
i5.KwikUIInputDateModule,
|
|
1405
|
+
i5.KwikUISelectComboboxModule,
|
|
1406
|
+
i5.KwikUITableModule,
|
|
1407
|
+
i5.KwikUITablePaginationModule,
|
|
1408
|
+
addonMobile.TuiSidebarModule,
|
|
1409
|
+
cdk.TuiActiveZoneModule], exports: [KwikIDAgentDashboardComponent] });
|
|
1410
|
+
/** @nocollapse */ KwikIDAgentDashboardModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardModule, imports: [[
|
|
1411
|
+
i6.CommonModule,
|
|
1412
|
+
http.HttpClientModule,
|
|
1413
|
+
i5$1.FormsModule,
|
|
1414
|
+
i5$1.ReactiveFormsModule,
|
|
1415
|
+
testing.RouterTestingModule,
|
|
1416
|
+
i5.KwikUIButtonModule,
|
|
1417
|
+
i5.KwikUIButtonIconModule,
|
|
1418
|
+
i5.KwikUIInputModule,
|
|
1419
|
+
i5.KwikUIInputDateModule,
|
|
1420
|
+
i5.KwikUISelectComboboxModule,
|
|
1421
|
+
i5.KwikUITableModule,
|
|
1422
|
+
i5.KwikUITablePaginationModule,
|
|
1423
|
+
addonMobile.TuiSidebarModule,
|
|
1424
|
+
cdk.TuiActiveZoneModule,
|
|
1425
|
+
]] });
|
|
1426
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDAgentDashboardModule, decorators: [{
|
|
1427
|
+
type: i0.NgModule,
|
|
1428
|
+
args: [{
|
|
1429
|
+
declarations: [
|
|
1430
|
+
KwikIDAgentDashboardComponent,
|
|
1431
|
+
CustomerListComponent,
|
|
1432
|
+
CustomerTileComponent,
|
|
1433
|
+
MenuComponent,
|
|
1434
|
+
KycSuccessComponent,
|
|
1435
|
+
KycPendingComponent,
|
|
1436
|
+
AddCustomerComponent,
|
|
1437
|
+
],
|
|
1438
|
+
imports: [
|
|
1439
|
+
i6.CommonModule,
|
|
1440
|
+
http.HttpClientModule,
|
|
1441
|
+
i5$1.FormsModule,
|
|
1442
|
+
i5$1.ReactiveFormsModule,
|
|
1443
|
+
testing.RouterTestingModule,
|
|
1444
|
+
i5.KwikUIButtonModule,
|
|
1445
|
+
i5.KwikUIButtonIconModule,
|
|
1446
|
+
i5.KwikUIInputModule,
|
|
1447
|
+
i5.KwikUIInputDateModule,
|
|
1448
|
+
i5.KwikUISelectComboboxModule,
|
|
1449
|
+
i5.KwikUITableModule,
|
|
1450
|
+
i5.KwikUITablePaginationModule,
|
|
1451
|
+
addonMobile.TuiSidebarModule,
|
|
1452
|
+
cdk.TuiActiveZoneModule,
|
|
1453
|
+
],
|
|
1454
|
+
exports: [KwikIDAgentDashboardComponent],
|
|
1455
|
+
}]
|
|
1456
|
+
}] });
|
|
1457
|
+
|
|
1458
|
+
/* kwikid-agent-dashboard */
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* Generated bundle index. Do not edit.
|
|
1462
|
+
*/
|
|
1463
|
+
|
|
1464
|
+
exports.KwikIDAgentDashboardComponent = KwikIDAgentDashboardComponent;
|
|
1465
|
+
exports.KwikIDAgentDashboardModule = KwikIDAgentDashboardModule;
|
|
1466
|
+
|
|
1467
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1468
|
+
|
|
1469
|
+
}));
|
|
1470
|
+
//# sourceMappingURL=kwikid-agent-dashboard.umd.js.map
|