@aggdirect/coolmap 2.9.6 → 2.9.8
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/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +10 -19
- package/src/assets/mixin.scss +28 -0
- package/src/assets/palette.scss +24 -0
- package/src/assets/variable.scss +15 -0
- package/src/lib/component/add-route/add-route.component.html +172 -0
- package/src/lib/component/add-route/add-route.component.scss +243 -0
- package/src/lib/component/add-route/add-route.component.spec.ts +23 -0
- package/src/lib/component/add-route/add-route.component.ts +394 -0
- package/src/lib/component/job-code/job-code.component.html +79 -0
- package/src/lib/component/job-code/job-code.component.scss +396 -0
- package/src/lib/component/job-code/job-code.component.ts +146 -0
- package/src/lib/component/map/map.component.css +0 -0
- package/src/lib/component/map/map.component.html +4 -0
- package/src/lib/component/map/map.component.spec.ts +23 -0
- package/src/lib/component/map/map.component.ts +34 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.html +46 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.scss +18 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.spec.ts +23 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.ts +130 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.html +48 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.scss +24 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.ts +143 -0
- package/src/lib/component/nav/nav.component.html +19 -0
- package/src/lib/component/nav/nav.component.scss +67 -0
- package/src/lib/component/nav/nav.component.ts +38 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.html +56 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.scss +168 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.spec.ts +23 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ts +43 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.html +73 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.scss +227 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.ts +233 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.html +7 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.scss +10 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.spec.ts +23 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ts +15 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.html +28 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.scss +172 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.spec.ts +23 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ts +20 -0
- package/src/lib/component/shared/dialog/dialog.component.html +7 -0
- package/src/lib/component/shared/dialog/dialog.component.scss +30 -0
- package/src/lib/component/shared/dialog/dialog.component.ts +18 -0
- package/src/lib/component/shared/estimation-display/estimation-display.component.html +7 -0
- package/src/lib/component/shared/estimation-display/estimation-display.component.scss +7 -0
- package/src/lib/component/shared/estimation-display/estimation-display.component.ts +13 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.html +46 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.scss +15 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.spec.ts +23 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.ts +54 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.html +11 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.scss +13 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.spec.ts +23 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.ts +19 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.html +5 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.scss +40 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.spec.ts +23 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.ts +11 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.html +19 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.scss +50 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.spec.ts +23 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.ts +74 -0
- package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.css +3 -0
- package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.html +6 -0
- package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.spec.ts +23 -0
- package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.ts +21 -0
- package/src/lib/coolmap.module.ts +120 -0
- package/{public-api.d.ts → src/public-api.ts} +8 -0
- package/src/test.ts +27 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/aggdirect-coolmap.mjs +0 -5
- package/esm2022/lib/component/add-route/add-route.component.mjs +0 -433
- package/esm2022/lib/component/job-code/job-code.component.mjs +0 -181
- package/esm2022/lib/component/map/map.component.mjs +0 -39
- package/esm2022/lib/component/nav/layout/add-route-nav/add-route-nav.component.mjs +0 -151
- package/esm2022/lib/component/nav/layout/job-code-nav/job-code-nav.component.mjs +0 -150
- package/esm2022/lib/component/nav/nav.component.mjs +0 -54
- package/esm2022/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.mjs +0 -77
- package/esm2022/lib/component/route-jobcode-list/route-jobcode-list.component.mjs +0 -319
- package/esm2022/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.mjs +0 -19
- package/esm2022/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.mjs +0 -37
- package/esm2022/lib/component/shared/dialog/dialog.component.mjs +0 -31
- package/esm2022/lib/component/shared/estimation-display/estimation-display.component.mjs +0 -18
- package/esm2022/lib/component/shared/job-route-list/job-route-list.component.mjs +0 -79
- package/esm2022/lib/component/shared/jobcode-overview/jobcode-overview.component.mjs +0 -24
- package/esm2022/lib/component/shared/jobcode-status/jobcode-status.component.mjs +0 -15
- package/esm2022/lib/component/shared/route-info-card/route-info-card.component.mjs +0 -62
- package/esm2022/lib/component/shared/searchoptiongroup/searchoptiongroup.component.mjs +0 -25
- package/esm2022/lib/coolmap.module.mjs +0 -193
- package/esm2022/public-api.mjs +0 -19
- package/fesm2022/aggdirect-coolmap.mjs +0 -1778
- package/fesm2022/aggdirect-coolmap.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/component/add-route/add-route.component.d.ts +0 -73
- package/lib/component/job-code/job-code.component.d.ts +0 -41
- package/lib/component/map/map.component.d.ts +0 -15
- package/lib/component/nav/layout/add-route-nav/add-route-nav.component.d.ts +0 -49
- package/lib/component/nav/layout/job-code-nav/job-code-nav.component.d.ts +0 -42
- package/lib/component/nav/nav.component.d.ts +0 -31
- package/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.d.ts +0 -20
- package/lib/component/route-jobcode-list/route-jobcode-list.component.d.ts +0 -42
- package/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.d.ts +0 -9
- package/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.d.ts +0 -12
- package/lib/component/shared/dialog/dialog.component.d.ts +0 -13
- package/lib/component/shared/estimation-display/estimation-display.component.d.ts +0 -8
- package/lib/component/shared/job-route-list/job-route-list.component.d.ts +0 -26
- package/lib/component/shared/jobcode-overview/jobcode-overview.component.d.ts +0 -10
- package/lib/component/shared/jobcode-status/jobcode-status.component.d.ts +0 -7
- package/lib/component/shared/route-info-card/route-info-card.component.d.ts +0 -32
- package/lib/component/shared/searchoptiongroup/searchoptiongroup.component.d.ts +0 -14
- package/lib/coolmap.module.d.ts +0 -46
package/karma.conf.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: '',
|
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
+
plugins: [
|
|
9
|
+
require('karma-jasmine'),
|
|
10
|
+
require('karma-chrome-launcher'),
|
|
11
|
+
require('karma-jasmine-html-reporter'),
|
|
12
|
+
require('karma-coverage'),
|
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
+
],
|
|
15
|
+
client: {
|
|
16
|
+
jasmine: {
|
|
17
|
+
// you can add configuration options for Jasmine here
|
|
18
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
19
|
+
// for example, you can disable the random execution with `random: false`
|
|
20
|
+
// or set a specific seed with `seed: 4321`
|
|
21
|
+
},
|
|
22
|
+
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
23
|
+
},
|
|
24
|
+
jasmineHtmlReporter: {
|
|
25
|
+
suppressAll: true // removes the duplicated traces
|
|
26
|
+
},
|
|
27
|
+
coverageReporter: {
|
|
28
|
+
dir: require('path').join(__dirname, '../../coverage/coolmap'),
|
|
29
|
+
subdir: '.',
|
|
30
|
+
reporters: [
|
|
31
|
+
{ type: 'html' },
|
|
32
|
+
{ type: 'text-summary' }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
reporters: ['progress', 'kjhtml'],
|
|
36
|
+
port: 9876,
|
|
37
|
+
colors: true,
|
|
38
|
+
logLevel: config.LOG_INFO,
|
|
39
|
+
autoWatch: true,
|
|
40
|
+
browsers: ['Chrome'],
|
|
41
|
+
singleRun: false,
|
|
42
|
+
restartOnFileChange: true
|
|
43
|
+
});
|
|
44
|
+
};
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aggdirect/coolmap",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.8",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.0.8",
|
|
6
6
|
"@angular/core": "^17.0.8"
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"description": "This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.",
|
|
18
18
|
"main": "karma.conf.js",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
|
+
},
|
|
19
22
|
"author": "Navin Vishwakarma <navin@ogmaconceptions.com>",
|
|
20
23
|
"contributors": [
|
|
21
24
|
"Santanu Das <santanu.das@ogmaconceptions.com>"
|
|
@@ -24,24 +27,12 @@
|
|
|
24
27
|
"keywords": [
|
|
25
28
|
"coolmap"
|
|
26
29
|
],
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"./package.json": {
|
|
31
|
-
"default": "./package.json"
|
|
32
|
-
},
|
|
33
|
-
".": {
|
|
34
|
-
"types": "./index.d.ts",
|
|
35
|
-
"esm2022": "./esm2022/aggdirect-coolmap.mjs",
|
|
36
|
-
"esm": "./esm2022/aggdirect-coolmap.mjs",
|
|
37
|
-
"default": "./fesm2022/aggdirect-coolmap.mjs"
|
|
38
|
-
}
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/bulldog-dev/npm-packages.git#stage"
|
|
39
33
|
},
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
"lib": "lib"
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/bulldog-dev/npm-packages/issues"
|
|
43
36
|
},
|
|
44
|
-
"
|
|
45
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
46
|
-
}
|
|
37
|
+
"homepage": "https://github.com/bulldog-dev/npm-packages/tree/stage#readme"
|
|
47
38
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@mixin ul{
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
list-style: none;
|
|
5
|
+
}
|
|
6
|
+
@mixin img{
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
}
|
|
10
|
+
@mixin justify-start{
|
|
11
|
+
display:flex;
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
}
|
|
14
|
+
@mixin justify-center{
|
|
15
|
+
display:flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
}
|
|
18
|
+
@mixin justify-space-between{
|
|
19
|
+
display:flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
}
|
|
22
|
+
@mixin justify-end{
|
|
23
|
+
display:flex;
|
|
24
|
+
justify-content: flex-start;
|
|
25
|
+
}
|
|
26
|
+
@mixin align-center{
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$color-key:'base' !default;
|
|
2
|
+
$colors:(
|
|
3
|
+
|
|
4
|
+
'primary':(50: #000, 100: #fff, 200: #326ad3, 300: #ffad56, 400: #39c471, 500: #e8e8e8, 600: #767676, 700: #fbfbfb, 800: #3f51b5),
|
|
5
|
+
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@function palette(
|
|
10
|
+
$name: 'primary',
|
|
11
|
+
$variant: $color-key,
|
|
12
|
+
$opacity: 1) {
|
|
13
|
+
$color: null;
|
|
14
|
+
$color-spectrum: map-get($colors, $name);
|
|
15
|
+
@if $color-spectrum {
|
|
16
|
+
$color: map-get($color-spectrum, $variant);
|
|
17
|
+
}
|
|
18
|
+
$alpha: if(type-of($opacity) == 'number', $opacity, map-get($color-opacity, $opacity));
|
|
19
|
+
@if $alpha {
|
|
20
|
+
$color: rgba($color, $alpha);
|
|
21
|
+
}
|
|
22
|
+
@return $color;
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@import './palette.scss';
|
|
2
|
+
@import './mixin.scss';
|
|
3
|
+
|
|
4
|
+
$black: palette('primary', 50);
|
|
5
|
+
$white: palette('primary', 100);
|
|
6
|
+
$blue: palette('primary', 200);
|
|
7
|
+
$orenge: palette('primary', 300);
|
|
8
|
+
$green: palette('primary', 400);
|
|
9
|
+
$grey: palette('primary', 500);
|
|
10
|
+
$softgrey: palette('primary', 600);
|
|
11
|
+
$softwhite: palette('primary', 700);
|
|
12
|
+
$buttoncolor: palette('primary', 800);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<div class="addroutebox">
|
|
2
|
+
<div class="routedetailbox" *ngIf="enablePopUp">
|
|
3
|
+
<div class="closebtnroutedetail">
|
|
4
|
+
<mat-icon (click)="prevantPopupClose = false; enablePopUp = false;">clear</mat-icon>
|
|
5
|
+
</div>
|
|
6
|
+
<lib-route-info-card [propData]="{className: 'routeCard', repository: config['repository']}" [popupData]="popupDetails"></lib-route-info-card>
|
|
7
|
+
<div class="createTxt">
|
|
8
|
+
<small>
|
|
9
|
+
Created by {{popupDetails['created_by_name']}} on {{popupDetails['created_at']}}
|
|
10
|
+
</small>
|
|
11
|
+
<button class="editbtn" (click)="editEvent()">Edit</button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="add_add_route_box" cdkDrag [style.visibility]="!enableForm ? 'hidden' : 'visible'">
|
|
15
|
+
<div class="topheadingprt">
|
|
16
|
+
<h2> {{routeId? 'EDIT' : 'ADD'}} ROUTE </h2>
|
|
17
|
+
<div class="buttonprt">
|
|
18
|
+
<button *ngIf="routeId" class="delbtn" (click)="openDialog()">Delete</button>
|
|
19
|
+
<button mat-raised-button type="submit" class="closebtn" (click)="changeNav.next('Addroute')">Close</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<form [formGroup]="addRouteForm">
|
|
23
|
+
<div class="route_form_area">
|
|
24
|
+
<div class="col-6">
|
|
25
|
+
<mat-form-field>
|
|
26
|
+
<mat-label>Route Name</mat-label>
|
|
27
|
+
<input matInput formControlName="route_name" autocomplete="nope" (mousedown)="$event.stopPropagation()">
|
|
28
|
+
<mat-error *ngIf="addRouteForm.controls['route_name'].hasError('required')">
|
|
29
|
+
Route Name is required
|
|
30
|
+
</mat-error>
|
|
31
|
+
</mat-form-field>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="col-6">
|
|
34
|
+
<mat-form-field>
|
|
35
|
+
<mat-label>Customer name</mat-label>
|
|
36
|
+
<input type="text" placeholder="Customer Name" matInput formControlName="customer_name" [matAutocomplete]="auto" (mousedown)="$event.stopPropagation()">
|
|
37
|
+
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete">
|
|
38
|
+
<mat-option *ngFor="let customer of customersList$ | async" [value]="customer['customer_name']">
|
|
39
|
+
{{customer['customer_name']}}
|
|
40
|
+
</mat-option>
|
|
41
|
+
</mat-autocomplete>
|
|
42
|
+
<mat-error *ngIf="addRouteForm.controls['customer_name'].hasError('required')">
|
|
43
|
+
Customer name is required.
|
|
44
|
+
</mat-error>
|
|
45
|
+
</mat-form-field>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="col-6">
|
|
48
|
+
<div class="wrap-box">
|
|
49
|
+
@if (config.repository === 'coolmap') {
|
|
50
|
+
<lib-searchoptiongroup
|
|
51
|
+
[searchConfig]="{form: addRouteForm, controlname: 'pickUpSearchOption'}"
|
|
52
|
+
(onUpdatePickUpSearchOption)="updatePickUpField()"/>
|
|
53
|
+
}
|
|
54
|
+
<div class="col-12">
|
|
55
|
+
<mat-form-field [style.display]="isSystemPickup ? 'block' : 'none'">
|
|
56
|
+
<mat-label>Pickup</mat-label>
|
|
57
|
+
<input type="text"
|
|
58
|
+
placeholder="Search..." matInput formControlName="pickup_location"
|
|
59
|
+
(mousedown)="$event.stopPropagation()" [matAutocomplete]="autopickUpList"
|
|
60
|
+
id="pickup_system_location">
|
|
61
|
+
<mat-autocomplete #autopickUpList="matAutocomplete" class="list_panel">
|
|
62
|
+
<mat-option *ngFor="let name of pickupOptions | async"
|
|
63
|
+
(onSelectionChange)="patchAddressValue(name, 'pickup')">
|
|
64
|
+
{{ name.formatted_address }}
|
|
65
|
+
</mat-option>
|
|
66
|
+
</mat-autocomplete>
|
|
67
|
+
<mat-error
|
|
68
|
+
*ngIf="addRouteForm.controls['pickup_lat_lng'].touched && addRouteForm.controls['pickup_lat_lng'].hasError('required')">
|
|
69
|
+
Please select pickup location from the list.
|
|
70
|
+
</mat-error>
|
|
71
|
+
</mat-form-field>
|
|
72
|
+
<mat-form-field [style.display]="isSystemPickup ? 'none' : 'block'">
|
|
73
|
+
<mat-label>Pickup</mat-label>
|
|
74
|
+
<input type="text"
|
|
75
|
+
placeholder="Search..." matInput
|
|
76
|
+
formControlName="pickup_location"
|
|
77
|
+
(mousedown)="$event.stopPropagation()"
|
|
78
|
+
#filterPickup id="pickup_google_location">
|
|
79
|
+
<mat-error
|
|
80
|
+
*ngIf="addRouteForm.controls['pickup_lat_lng'].touched && addRouteForm.controls['pickup_lat_lng'].hasError('required')">
|
|
81
|
+
Please select pickup location from the list.
|
|
82
|
+
</mat-error>
|
|
83
|
+
</mat-form-field>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="col-6">
|
|
88
|
+
<div class="wrap-box">
|
|
89
|
+
@if (config.repository === 'coolmap') {
|
|
90
|
+
<lib-searchoptiongroup
|
|
91
|
+
[searchConfig]="{form: addRouteForm, controlname: 'deliverySearchOtption'}"
|
|
92
|
+
(onUpdatePickUpSearchOption)="updateDeliveryField()"/>
|
|
93
|
+
}
|
|
94
|
+
<div class="col-12">
|
|
95
|
+
<mat-form-field [style.display]="isSystemDelivery ? 'none' : 'block'">
|
|
96
|
+
<mat-label>Delivery</mat-label>
|
|
97
|
+
<div>
|
|
98
|
+
<input type="text"
|
|
99
|
+
placeholder="Search..."
|
|
100
|
+
matInput #filterDelivery
|
|
101
|
+
formControlName="delivery_location"
|
|
102
|
+
(mousedown)="$event.stopPropagation()"
|
|
103
|
+
id="delivery_google_location">
|
|
104
|
+
</div>
|
|
105
|
+
<mat-error *ngIf="addRouteForm.controls['delivery_lat_lng'].touched && addRouteForm.controls['delivery_lat_lng'].hasError('required')">
|
|
106
|
+
Please select delivery location from the list.
|
|
107
|
+
</mat-error>
|
|
108
|
+
</mat-form-field>
|
|
109
|
+
<mat-form-field [style.display]="isSystemDelivery ? 'block' : 'none'">
|
|
110
|
+
<mat-label>Delivery</mat-label>
|
|
111
|
+
<div>
|
|
112
|
+
<input type="text" placeholder="Search..." matInput formControlName="delivery_location"
|
|
113
|
+
(mousedown)="$event.stopPropagation()" [matAutocomplete]="autoDeliveryList"
|
|
114
|
+
id="delivery_system_location">
|
|
115
|
+
<mat-autocomplete #autoDeliveryList="matAutocomplete" class="list_panel">
|
|
116
|
+
<mat-option *ngFor="let name of deliveryOptions | async"
|
|
117
|
+
(onSelectionChange)="patchAddressValue(name, 'delivery')">
|
|
118
|
+
{{ name.formatted_address }}
|
|
119
|
+
</mat-option>
|
|
120
|
+
</mat-autocomplete>
|
|
121
|
+
</div>
|
|
122
|
+
<mat-error *ngIf="addRouteForm.controls['delivery_lat_lng'].touched && addRouteForm.controls['delivery_lat_lng'].hasError('required')">
|
|
123
|
+
Please select delivery location from the list.
|
|
124
|
+
</mat-error>
|
|
125
|
+
</mat-form-field>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="col-6">
|
|
130
|
+
<mat-form-field>
|
|
131
|
+
<mat-label>Notes</mat-label>
|
|
132
|
+
<textarea style="height: 18px; resize: none;" matInput name="" id="" cols="30" rows="10" formControlName="note" autocomplete="nope" (mousedown)="$event.stopPropagation()"></textarea>
|
|
133
|
+
<mat-error *ngIf="addRouteForm.controls['note'].hasError('maxlength')">
|
|
134
|
+
Notes should be within 2048 characters.
|
|
135
|
+
</mat-error>
|
|
136
|
+
</mat-form-field>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="col-6 d-flex">
|
|
140
|
+
<div class="inputbox m-0">
|
|
141
|
+
<mat-form-field>
|
|
142
|
+
<mat-label>Unit type</mat-label>
|
|
143
|
+
<mat-select formControlName="unit_id" (selectionChange)="checkAndFetchRouteInformation()" (mousedown)="$event.stopPropagation()">
|
|
144
|
+
<mat-option *ngFor="let unit of unitsList" [value]="unit?.id"> {{unit?.type}} </mat-option>
|
|
145
|
+
</mat-select>
|
|
146
|
+
<mat-error *ngIf="addRouteForm.controls['unit_id'].hasError('required')">
|
|
147
|
+
Unit is required
|
|
148
|
+
</mat-error>
|
|
149
|
+
</mat-form-field>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="col-6">
|
|
153
|
+
<app-estimation-display *ngIf="addRouteForm?.value?.pickup_lat_lng && addRouteForm?.value?.delivery_lat_lng" [value]="addRouteForm['value']"></app-estimation-display>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="col-6" *ngIf="addRouteForm['value']['trucker_pay_estimate'] && addRouteForm['value']['customer_price_estimate']">
|
|
156
|
+
<span *ngIf="config['repository'] !== 'customer'" class="estimate" (mousedown)="$event.stopPropagation()">
|
|
157
|
+
Trucker Pay Estimate - <b>{{'$'+ addRouteForm['value']['trucker_pay_estimate']}}</b>
|
|
158
|
+
</span>
|
|
159
|
+
<span class="estimate" (mousedown)="$event.stopPropagation()">
|
|
160
|
+
Customer Price Estimate - <b>{{'$'+ addRouteForm['value']['customer_price_estimate']}}</b>
|
|
161
|
+
</span>
|
|
162
|
+
</div>
|
|
163
|
+
<button mat-raised-button type="submit" (click)="saveRoute()" *ngIf="preventSave"
|
|
164
|
+
[disabled]="addRouteForm.invalid && preventSave || preventInitialSave">{{routeId? 'Update' : 'Save'}}
|
|
165
|
+
</button>
|
|
166
|
+
<div class="loader">
|
|
167
|
+
<mat-spinner *ngIf="!preventSave"></mat-spinner>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</form>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
@import "../../../assets/variable.scss";
|
|
2
|
+
.addroutebox{
|
|
3
|
+
width: calc(100% - 340px);
|
|
4
|
+
position: absolute;
|
|
5
|
+
left: 320px;
|
|
6
|
+
bottom: 10px;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
|
|
11
|
+
.routedetailbox{
|
|
12
|
+
max-width: 300px;
|
|
13
|
+
padding: 10px;
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
border-radius: 20px;
|
|
16
|
+
margin-right: 20px;
|
|
17
|
+
@media (min-width:1600px) {
|
|
18
|
+
max-width: 280px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
.editbtn{
|
|
22
|
+
background: #326ad3;
|
|
23
|
+
padding: 10px 25px 10px 25px;
|
|
24
|
+
color: white;
|
|
25
|
+
font-size: 0.8125rem;
|
|
26
|
+
border-radius: 30px;
|
|
27
|
+
float: right;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.add_add_route_box {
|
|
31
|
+
background: $white;
|
|
32
|
+
padding: 10px 20px;
|
|
33
|
+
border-radius: 20px;
|
|
34
|
+
box-shadow: 2px 4px 4px 2px rgb(0 0 0 / 14%);
|
|
35
|
+
// height: 370px;
|
|
36
|
+
width: 100%;
|
|
37
|
+
position: relative;
|
|
38
|
+
cursor: move;
|
|
39
|
+
|
|
40
|
+
.route_form_area {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
.col-6 {
|
|
45
|
+
width: 48%;
|
|
46
|
+
margin-top: 10px;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
.inputbox {
|
|
49
|
+
width: 47%;
|
|
50
|
+
}
|
|
51
|
+
span {
|
|
52
|
+
font-size: 0.875rem;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
button {
|
|
56
|
+
background: $blue;
|
|
57
|
+
padding: 0px 18px;
|
|
58
|
+
color: $white;
|
|
59
|
+
font-size: 0.8125rem;
|
|
60
|
+
border-radius: 30px;
|
|
61
|
+
position: absolute;
|
|
62
|
+
right: 18px;
|
|
63
|
+
top: 20px;
|
|
64
|
+
height: 35px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.closebtn{
|
|
69
|
+
background: $black;
|
|
70
|
+
color: $white;
|
|
71
|
+
border-radius: 30px;
|
|
72
|
+
padding: 0px 18px;
|
|
73
|
+
margin-left: 10px;
|
|
74
|
+
height: 35px;
|
|
75
|
+
}
|
|
76
|
+
.delbtn{
|
|
77
|
+
background:red;
|
|
78
|
+
color: $white;
|
|
79
|
+
border-radius: 30px;
|
|
80
|
+
padding: 10px 18px 10px 18px;
|
|
81
|
+
}
|
|
82
|
+
.add_route_listingpart {
|
|
83
|
+
.listing_toggle {
|
|
84
|
+
background: $white;
|
|
85
|
+
border-radius: 15px;
|
|
86
|
+
padding: 8px 10px;
|
|
87
|
+
position: absolute;
|
|
88
|
+
right: 10px;
|
|
89
|
+
top: 30px;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.listing_box {
|
|
94
|
+
background: #282828;
|
|
95
|
+
height: 100vh;
|
|
96
|
+
position: fixed;
|
|
97
|
+
right: 0;
|
|
98
|
+
top: 0;
|
|
99
|
+
z-index: 1111;
|
|
100
|
+
box-shadow: -3px 0px 5px 0px rgba(255, 255, 255, 0.08);
|
|
101
|
+
transition: 0.5s;
|
|
102
|
+
-webkit-transition: 0.5s;
|
|
103
|
+
transition: 0.5s;
|
|
104
|
+
-webkit-transition: 0.5s;
|
|
105
|
+
-moz-transition: 0.5s;
|
|
106
|
+
width: 0;
|
|
107
|
+
border-radius: 40px 0px 0px 40px;
|
|
108
|
+
opacity: 0;
|
|
109
|
+
.closebtn {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
.show {
|
|
114
|
+
.listing_box {
|
|
115
|
+
width: 250px;
|
|
116
|
+
max-width: 250px;
|
|
117
|
+
-webkit-box-flex: 0;
|
|
118
|
+
flex: 0 0 250px;
|
|
119
|
+
transition: 0.5s;
|
|
120
|
+
-webkit-transition: 0.5s;
|
|
121
|
+
transition: 0.5s;
|
|
122
|
+
-webkit-transition: 0.5s;
|
|
123
|
+
-moz-transition: 0.5s;
|
|
124
|
+
padding: 40px 0px 40px 20px;
|
|
125
|
+
opacity: 1;
|
|
126
|
+
@media (min-width:1600px) {
|
|
127
|
+
width: 320px;
|
|
128
|
+
max-width: 320px;
|
|
129
|
+
-webkit-box-flex: 0;
|
|
130
|
+
flex: 0 0 320px;
|
|
131
|
+
}
|
|
132
|
+
h2 {
|
|
133
|
+
color: $white;
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
}
|
|
136
|
+
ul {
|
|
137
|
+
padding: 0 20px 0 0;
|
|
138
|
+
li {
|
|
139
|
+
background: #4a4a4a;
|
|
140
|
+
padding: 15px;
|
|
141
|
+
border-radius: 15px;
|
|
142
|
+
display: flex;
|
|
143
|
+
margin-bottom: 15px;
|
|
144
|
+
.companayIcon {
|
|
145
|
+
width: 40px;
|
|
146
|
+
height: 40px;
|
|
147
|
+
border-radius: 10px;
|
|
148
|
+
background: $white;
|
|
149
|
+
margin-right: 10px;
|
|
150
|
+
display: flex;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
align-items: center;
|
|
153
|
+
}
|
|
154
|
+
.company_cont {
|
|
155
|
+
width: calc(100% - 50px);
|
|
156
|
+
h3 {
|
|
157
|
+
color: $white;
|
|
158
|
+
font-size: 15px;
|
|
159
|
+
font-weight: normal;
|
|
160
|
+
margin: 0;
|
|
161
|
+
text-overflow: ellipsis;
|
|
162
|
+
max-width: 129px;
|
|
163
|
+
-webkit-box-orient: vertical;
|
|
164
|
+
white-space: nowrap;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
@media (min-width:1600px) {
|
|
167
|
+
max-width: 170px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
p {
|
|
171
|
+
color: #bcbcbc;
|
|
172
|
+
font-size: 12px;
|
|
173
|
+
margin: 5px 0;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
text-overflow: ellipsis;
|
|
176
|
+
display: -webkit-box;
|
|
177
|
+
-webkit-line-clamp: 2;
|
|
178
|
+
-webkit-box-orient: vertical;
|
|
179
|
+
line-height: 16px;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
.closebtn {
|
|
186
|
+
position: absolute;
|
|
187
|
+
left: -33px;
|
|
188
|
+
top: 50px;
|
|
189
|
+
background: #282828;
|
|
190
|
+
color: $white;
|
|
191
|
+
padding: 8px;
|
|
192
|
+
border-top-left-radius: 15px;
|
|
193
|
+
border-bottom-left-radius: 15px;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
box-shadow: -4px 2px 5px 0px rgba(255, 255, 255, 0.08);
|
|
196
|
+
display: block;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
.loader{
|
|
200
|
+
position: absolute;
|
|
201
|
+
width: 95%;
|
|
202
|
+
height: 100%;
|
|
203
|
+
display: flex;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
align-items: center;
|
|
206
|
+
pointer-events: none;
|
|
207
|
+
}
|
|
208
|
+
.buttonprt{
|
|
209
|
+
margin-right: 83px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.closebtnroutedetail{
|
|
213
|
+
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.11);
|
|
214
|
+
border-radius: 100%;
|
|
215
|
+
width: 30px;
|
|
216
|
+
height: 30px;
|
|
217
|
+
display: flex;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
align-items: center;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
background: #fff;
|
|
222
|
+
position: absolute;
|
|
223
|
+
top: -11px;
|
|
224
|
+
left: -11px;
|
|
225
|
+
}
|
|
226
|
+
.routenotes{
|
|
227
|
+
max-height: 170px;
|
|
228
|
+
overflow: auto;
|
|
229
|
+
}
|
|
230
|
+
.estimate{
|
|
231
|
+
margin-right: 20px;
|
|
232
|
+
font-size: 0.7rem;
|
|
233
|
+
@media (min-width:1600px) {
|
|
234
|
+
font-size: 0.95rem;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
.wrap-box{
|
|
238
|
+
background: #F3F3F3;
|
|
239
|
+
padding: 10px 20px;
|
|
240
|
+
border-radius: 15px;
|
|
241
|
+
border: 1px solid #dadada;
|
|
242
|
+
margin-bottom: 20px;
|
|
243
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AddRouteComponent } from './add-route.component';
|
|
4
|
+
|
|
5
|
+
describe('AddRouteComponent', () => {
|
|
6
|
+
let component: AddRouteComponent;
|
|
7
|
+
let fixture: ComponentFixture<AddRouteComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ AddRouteComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(AddRouteComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|