@aggdirect/coolmap 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +27 -0
- 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 +140 -0
- package/src/lib/component/add-route/add-route.component.scss +235 -0
- package/src/lib/component/add-route/add-route.component.spec.ts +23 -0
- package/src/lib/component/add-route/add-route.component.ts +270 -0
- package/src/lib/component/job-code/job-code.component.html +93 -0
- package/src/lib/component/job-code/job-code.component.scss +427 -0
- package/src/lib/component/job-code/job-code.component.ts +94 -0
- package/src/lib/component/map/map.component.css +0 -0
- package/src/lib/component/map/map.component.html +5 -0
- package/src/lib/component/map/map.component.spec.ts +23 -0
- package/src/lib/component/map/map.component.ts +33 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.html +44 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.scss +0 -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 +70 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.html +43 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.scss +5 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.ts +64 -0
- package/src/lib/component/nav/nav.component.html +19 -0
- package/src/lib/component/nav/nav.component.scss +65 -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 +167 -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 +42 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.html +66 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.scss +226 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.ts +234 -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 +30 -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 +19 -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/job-route-list/job-route-list.component.html +27 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.scss +3 -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 +8 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.scss +12 -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 +15 -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 +32 -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 +12 -0
- package/src/lib/coolmap.component.ts +20 -0
- package/src/lib/coolmap.module.ts +92 -0
- package/src/public-api.ts +10 -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/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Coolmap
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
To Install the library
|
|
9
|
+
Run npm install @aggdirect/coolmap
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Providing the global configuration is optional and when used you should only provide the configuration in your root module.
|
|
14
|
+
|
|
15
|
+
`import { CoolmapModule } from 'coolmap';`
|
|
16
|
+
|
|
17
|
+
Following we can use for coolmap.
|
|
18
|
+
|
|
19
|
+
<app-nav (drawer)="boolean" (changeNav)="$event"></app-nav>
|
|
20
|
+
|
|
21
|
+
<app-add-route-nav [navValue]="navalue"
|
|
22
|
+
(changeNav)="$event"
|
|
23
|
+
(addemit)="$event"
|
|
24
|
+
[updateRouteList]="boolean"></app-add-route-nav>
|
|
25
|
+
|
|
26
|
+
<app-map></app-map>
|
|
27
|
+
|
|
28
|
+
<app-job-code
|
|
29
|
+
[jobdetail]="jobcodeData"
|
|
30
|
+
(clearJobDetails)="$event"></app-job-code>
|
|
31
|
+
|
|
32
|
+
<app-add-route
|
|
33
|
+
(changeNav)="$event"
|
|
34
|
+
[routeData]="boolean"
|
|
35
|
+
(updateRouteList)="$event"></app-add-route>
|
|
36
|
+
|
|
37
|
+
## Code scaffolding
|
|
38
|
+
|
|
39
|
+
Run `ng generate component component-name --project coolmap` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project coolmap`.
|
|
40
|
+
> Note: Don't forget to add `--project coolmap` or else it will be added to the default project in your `angular.json` file.
|
|
41
|
+
|
|
42
|
+
## Build
|
|
43
|
+
|
|
44
|
+
Run `ng build coolmap` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
45
|
+
|
|
46
|
+
## Publishing
|
|
47
|
+
|
|
48
|
+
After building your library with `ng build coolmap`, go to the dist folder `cd dist/coolmap` and run `npm publish`.
|
|
49
|
+
|
|
50
|
+
## Running unit tests
|
|
51
|
+
|
|
52
|
+
Run `ng test coolmap` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
53
|
+
|
|
54
|
+
## Further help
|
|
55
|
+
|
|
56
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
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
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aggdirect/coolmap",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^14.2.0",
|
|
6
|
+
"@angular/core": "^14.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"allowedNonPeerDependencies": {
|
|
12
|
+
"mapbox-gl": "^2.10.0",
|
|
13
|
+
"@types/mapbox-gl": "^2.7.5",
|
|
14
|
+
"@turf/turf": "^6.5.0",
|
|
15
|
+
"deck.gl": "^8.4.16"
|
|
16
|
+
},
|
|
17
|
+
"description": "This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.",
|
|
18
|
+
"main": "karma.conf.js",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
|
+
},
|
|
22
|
+
"author": "Navin Vishwakarma <navin@ogmaconceptions.com>",
|
|
23
|
+
"contributors": [
|
|
24
|
+
"Santanu Das <santanu.das@ogmaconceptions.com>"
|
|
25
|
+
],
|
|
26
|
+
"license": "ISC"
|
|
27
|
+
}
|
|
@@ -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,140 @@
|
|
|
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
|
+
<div class="destination">
|
|
7
|
+
<div class="duration">
|
|
8
|
+
<p class="pickprt"><b>Pickup:</b>{{popupDetails['pickup_location']}}</p>
|
|
9
|
+
<p class="dropprt"><b>Delivery:</b>{{popupDetails['delivery_location']}}</p>
|
|
10
|
+
</div>
|
|
11
|
+
<span><b>Name:</b> {{popupDetails['route_name']}}</span>
|
|
12
|
+
<span><b>Customer:</b> {{popupDetails['customer_name']}}</span>
|
|
13
|
+
<span><b>Material:</b> {{popupDetails['material']}}</span>
|
|
14
|
+
<span><b>Type:</b> {{popupDetails['unit']}}</span>
|
|
15
|
+
<span><b>Distance:</b> {{popupDetails['estimated_distance']}}</span>
|
|
16
|
+
<span><b>Travel Time:</b> {{popupDetails['estimated_time']}}</span>
|
|
17
|
+
|
|
18
|
+
<span class="routenotes"><b>Notes:</b> {{popupDetails['note']}}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="createTxt">
|
|
21
|
+
<small>
|
|
22
|
+
Created by {{popupDetails['created_by_name']}} on {{popupDetails['created_at']}}
|
|
23
|
+
</small>
|
|
24
|
+
<button class="editbtn" (click)="editEvent()">Edit</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="add_add_route_box" cdkDrag [style.visibility]="!enableForm ? 'hidden' : 'visible'">
|
|
28
|
+
<div class="topheadingprt">
|
|
29
|
+
<h2> {{routeId? 'EDIT' : 'ADD'}} ROUTE </h2>
|
|
30
|
+
<div class="buttonprt">
|
|
31
|
+
<button class="delbtn" (click)="openDialog()">Delete</button>
|
|
32
|
+
<button mat-raised-button type="submit" class="closebtn" (click)="changeNav.next('Addroute')">Close</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<form [formGroup]="addRouteForm">
|
|
36
|
+
<div class="route_form_area">
|
|
37
|
+
<div class="col-6">
|
|
38
|
+
<mat-form-field>
|
|
39
|
+
<mat-label>Route Name</mat-label>
|
|
40
|
+
<input matInput formControlName="route_name" autocomplete="nope" (mousedown)="$event.stopPropagation()">
|
|
41
|
+
<mat-error *ngIf="addRouteForm.controls['route_name'].hasError('required')">
|
|
42
|
+
Route Name is required
|
|
43
|
+
</mat-error>
|
|
44
|
+
</mat-form-field>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="col-6">
|
|
47
|
+
<mat-form-field>
|
|
48
|
+
<input type="text" placeholder="Customer Name" matInput formControlName="customer_name" [matAutocomplete]="auto" (mousedown)="$event.stopPropagation()">
|
|
49
|
+
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete">
|
|
50
|
+
<mat-option *ngFor="let customer of customersList$ | async" [value]="customer['customer_name']">
|
|
51
|
+
{{customer['customer_name']}}
|
|
52
|
+
</mat-option>
|
|
53
|
+
</mat-autocomplete>
|
|
54
|
+
<mat-error *ngIf="addRouteForm.controls['customer_name'].hasError('required')">
|
|
55
|
+
Customer name is required.
|
|
56
|
+
</mat-error>
|
|
57
|
+
</mat-form-field>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="col-6">
|
|
60
|
+
<mat-form-field>
|
|
61
|
+
<mat-label>Pickup</mat-label>
|
|
62
|
+
<input type="text" placeholder="Search..." matInput #filterPickup [matAutocomplete]="pickupAutocomplete"
|
|
63
|
+
formControlName="pickup_location" (mousedown)="$event.stopPropagation()">
|
|
64
|
+
|
|
65
|
+
<mat-autocomplete #pickupAutocomplete="matAutocomplete">
|
|
66
|
+
<mat-option (click)="selectedLongLat('pickup', option)" *ngFor="let option of pickupOptions"
|
|
67
|
+
[value]="option?.place_name">
|
|
68
|
+
{{option?.place_name}}
|
|
69
|
+
</mat-option>
|
|
70
|
+
</mat-autocomplete>
|
|
71
|
+
</mat-form-field>
|
|
72
|
+
<mat-error *ngIf="addRouteForm.controls['pickup_lat_lng'].touched && addRouteForm.controls['pickup_lat_lng'].hasError('required')">
|
|
73
|
+
Please select pickup location from the list.
|
|
74
|
+
</mat-error>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="col-6">
|
|
77
|
+
<mat-form-field>
|
|
78
|
+
<mat-label>Delivery</mat-label>
|
|
79
|
+
<input type="text" placeholder="Search..." matInput #filterDelivery [matAutocomplete]="deliveryAutocomplete"
|
|
80
|
+
formControlName="delivery_location" (mousedown)="$event.stopPropagation()">
|
|
81
|
+
<mat-autocomplete #deliveryAutocomplete="matAutocomplete">
|
|
82
|
+
<mat-option (click)="selectedLongLat('delivery', option)" *ngFor="let option of deliveryOptions"
|
|
83
|
+
[value]="option?.place_name">
|
|
84
|
+
{{option?.place_name}}
|
|
85
|
+
</mat-option>
|
|
86
|
+
</mat-autocomplete>
|
|
87
|
+
</mat-form-field>
|
|
88
|
+
<mat-error *ngIf="addRouteForm.controls['delivery_lat_lng'].touched && addRouteForm.controls['delivery_lat_lng'].hasError('required')">
|
|
89
|
+
Please select delivery location from the list.
|
|
90
|
+
</mat-error>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="col-6">
|
|
93
|
+
<mat-form-field>
|
|
94
|
+
<mat-label>Notes</mat-label>
|
|
95
|
+
<textarea style="height: 18px; resize: none;" matInput name="" id="" cols="30" rows="10" formControlName="note" autocomplete="nope" (mousedown)="$event.stopPropagation()"></textarea>
|
|
96
|
+
<mat-error *ngIf="addRouteForm.controls['note'].hasError('maxlength')">
|
|
97
|
+
Notes should be within 2048 characters.
|
|
98
|
+
</mat-error>
|
|
99
|
+
</mat-form-field>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="col-6 d-flex">
|
|
103
|
+
<div class="inputbox m-0">
|
|
104
|
+
<mat-form-field>
|
|
105
|
+
<mat-label>Unit type</mat-label>
|
|
106
|
+
<mat-select formControlName="unit_id" (selectionChange)="checkAndFetchRouteInformation()" (mousedown)="$event.stopPropagation()">
|
|
107
|
+
<mat-option *ngFor="let unit of unitsList" [value]="unit?.id"> {{unit?.type}} </mat-option>
|
|
108
|
+
</mat-select>
|
|
109
|
+
<mat-error *ngIf="addRouteForm.controls['unit_id'].hasError('required')">
|
|
110
|
+
Unit is required
|
|
111
|
+
</mat-error>
|
|
112
|
+
</mat-form-field>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div class="inputbox m-0">
|
|
116
|
+
<mat-form-field>
|
|
117
|
+
<mat-label>Material</mat-label>
|
|
118
|
+
<mat-select formControlName="materials_id" (mousedown)="$event.stopPropagation()">
|
|
119
|
+
<mat-option *ngFor="let material of materialsList" [value]="material?.material_id"> {{material?.material}}
|
|
120
|
+
</mat-option>
|
|
121
|
+
</mat-select>
|
|
122
|
+
<mat-error *ngIf="addRouteForm.controls['materials_id'].hasError('required')">
|
|
123
|
+
Meterial is required
|
|
124
|
+
</mat-error>
|
|
125
|
+
</mat-form-field>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="col-6">
|
|
129
|
+
<app-estimation-display *ngIf="addRouteForm?.value?.pickup_lat_lng && addRouteForm?.value?.delivery_lat_lng" [value]="addRouteForm['value']"></app-estimation-display>
|
|
130
|
+
</div>
|
|
131
|
+
<button mat-raised-button type="submit" (click)="saveRoute()" *ngIf="preventSave"
|
|
132
|
+
[disabled]="addRouteForm.invalid && preventSave || preventInitialSave">{{routeId? 'Update' : 'Save'}}
|
|
133
|
+
</button>
|
|
134
|
+
<div class="loader">
|
|
135
|
+
<mat-spinner *ngIf="!preventSave"></mat-spinner>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</form>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
@import "../../../assets/variable.scss";
|
|
2
|
+
.addroutebox{
|
|
3
|
+
width: calc(100% - 315px);
|
|
4
|
+
position: absolute;
|
|
5
|
+
left: 300px;
|
|
6
|
+
bottom: 10px;
|
|
7
|
+
z-index: 999;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
|
|
12
|
+
.routedetailbox{
|
|
13
|
+
max-width: 300px;
|
|
14
|
+
padding: 10px;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
border-radius: 20px;
|
|
17
|
+
margin-right: 20px;
|
|
18
|
+
@media (min-width:1600px) {
|
|
19
|
+
max-width: 280px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.editbtn{
|
|
23
|
+
background: #326ad3;
|
|
24
|
+
padding: 10px 25px 10px 25px;
|
|
25
|
+
color: white;
|
|
26
|
+
font-size: 0.8125rem;
|
|
27
|
+
border-radius: 30px;
|
|
28
|
+
float: right;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.add_add_route_box {
|
|
32
|
+
background: $white;
|
|
33
|
+
padding: 10px 20px;
|
|
34
|
+
border-radius: 20px;
|
|
35
|
+
box-shadow: 2px 4px 4px 2px rgb(0 0 0 / 14%);
|
|
36
|
+
height: 370px;
|
|
37
|
+
width: 100%;
|
|
38
|
+
position: relative;
|
|
39
|
+
cursor: move;
|
|
40
|
+
|
|
41
|
+
.route_form_area {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
.col-6 {
|
|
46
|
+
width: 48%;
|
|
47
|
+
margin-top: 15px;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
.inputbox {
|
|
50
|
+
width: 47%;
|
|
51
|
+
}
|
|
52
|
+
span {
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
button {
|
|
57
|
+
background: $blue;
|
|
58
|
+
padding: 10px 18px 10px 18px;
|
|
59
|
+
color: $white;
|
|
60
|
+
font-size: 0.8125rem;
|
|
61
|
+
border-radius: 30px;
|
|
62
|
+
position: absolute;
|
|
63
|
+
right: 18px;
|
|
64
|
+
top: 20px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.closebtn{
|
|
69
|
+
background: $black;
|
|
70
|
+
color: $white;
|
|
71
|
+
border-radius: 30px;
|
|
72
|
+
padding: 10px 18px 10px 18px;
|
|
73
|
+
margin-left: 10px;
|
|
74
|
+
}
|
|
75
|
+
.delbtn{
|
|
76
|
+
background:red;
|
|
77
|
+
color: $white;
|
|
78
|
+
border-radius: 30px;
|
|
79
|
+
padding: 10px 18px 10px 18px;
|
|
80
|
+
}
|
|
81
|
+
.add_route_listingpart {
|
|
82
|
+
.listing_toggle {
|
|
83
|
+
background: $white;
|
|
84
|
+
border-radius: 15px;
|
|
85
|
+
padding: 8px 10px;
|
|
86
|
+
position: absolute;
|
|
87
|
+
right: 10px;
|
|
88
|
+
top: 30px;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.listing_box {
|
|
93
|
+
background: #282828;
|
|
94
|
+
height: 100vh;
|
|
95
|
+
position: fixed;
|
|
96
|
+
right: 0;
|
|
97
|
+
top: 0;
|
|
98
|
+
z-index: 1111;
|
|
99
|
+
box-shadow: -3px 0px 5px 0px rgba(255, 255, 255, 0.08);
|
|
100
|
+
transition: 0.5s;
|
|
101
|
+
-webkit-transition: 0.5s;
|
|
102
|
+
transition: 0.5s;
|
|
103
|
+
-webkit-transition: 0.5s;
|
|
104
|
+
-moz-transition: 0.5s;
|
|
105
|
+
width: 0;
|
|
106
|
+
border-radius: 40px 0px 0px 40px;
|
|
107
|
+
opacity: 0;
|
|
108
|
+
.closebtn {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
.show {
|
|
113
|
+
.listing_box {
|
|
114
|
+
width: 250px;
|
|
115
|
+
max-width: 250px;
|
|
116
|
+
-webkit-box-flex: 0;
|
|
117
|
+
flex: 0 0 250px;
|
|
118
|
+
transition: 0.5s;
|
|
119
|
+
-webkit-transition: 0.5s;
|
|
120
|
+
transition: 0.5s;
|
|
121
|
+
-webkit-transition: 0.5s;
|
|
122
|
+
-moz-transition: 0.5s;
|
|
123
|
+
padding: 40px 0px 40px 20px;
|
|
124
|
+
opacity: 1;
|
|
125
|
+
@media (min-width:1600px) {
|
|
126
|
+
width: 320px;
|
|
127
|
+
max-width: 320px;
|
|
128
|
+
-webkit-box-flex: 0;
|
|
129
|
+
flex: 0 0 320px;
|
|
130
|
+
}
|
|
131
|
+
h2 {
|
|
132
|
+
color: $white;
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
}
|
|
135
|
+
ul {
|
|
136
|
+
padding: 0 20px 0 0;
|
|
137
|
+
li {
|
|
138
|
+
background: #4a4a4a;
|
|
139
|
+
padding: 15px;
|
|
140
|
+
border-radius: 15px;
|
|
141
|
+
display: flex;
|
|
142
|
+
margin-bottom: 15px;
|
|
143
|
+
.companayIcon {
|
|
144
|
+
width: 40px;
|
|
145
|
+
height: 40px;
|
|
146
|
+
border-radius: 10px;
|
|
147
|
+
background: $white;
|
|
148
|
+
margin-right: 10px;
|
|
149
|
+
display: flex;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
align-items: center;
|
|
152
|
+
}
|
|
153
|
+
.company_cont {
|
|
154
|
+
width: calc(100% - 50px);
|
|
155
|
+
h3 {
|
|
156
|
+
color: $white;
|
|
157
|
+
font-size: 15px;
|
|
158
|
+
font-weight: normal;
|
|
159
|
+
margin: 0;
|
|
160
|
+
text-overflow: ellipsis;
|
|
161
|
+
max-width: 129px;
|
|
162
|
+
-webkit-box-orient: vertical;
|
|
163
|
+
white-space: nowrap;
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
@media (min-width:1600px) {
|
|
166
|
+
max-width: 170px;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
p {
|
|
170
|
+
color: #bcbcbc;
|
|
171
|
+
font-size: 12px;
|
|
172
|
+
margin: 5px 0;
|
|
173
|
+
overflow: hidden;
|
|
174
|
+
text-overflow: ellipsis;
|
|
175
|
+
display: -webkit-box;
|
|
176
|
+
-webkit-line-clamp: 2;
|
|
177
|
+
-webkit-box-orient: vertical;
|
|
178
|
+
line-height: 16px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
.closebtn {
|
|
185
|
+
position: absolute;
|
|
186
|
+
left: -33px;
|
|
187
|
+
top: 50px;
|
|
188
|
+
background: #282828;
|
|
189
|
+
color: $white;
|
|
190
|
+
padding: 8px;
|
|
191
|
+
border-top-left-radius: 15px;
|
|
192
|
+
border-bottom-left-radius: 15px;
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
box-shadow: -4px 2px 5px 0px rgba(255, 255, 255, 0.08);
|
|
195
|
+
display: block;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
.loader{
|
|
199
|
+
position: absolute;
|
|
200
|
+
width: 95%;
|
|
201
|
+
height: 100%;
|
|
202
|
+
display: flex;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
align-items: center;
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
}
|
|
207
|
+
.buttonprt{
|
|
208
|
+
margin-right: 83px;
|
|
209
|
+
}
|
|
210
|
+
.destination{
|
|
211
|
+
.duration{
|
|
212
|
+
padding: 10px;
|
|
213
|
+
}
|
|
214
|
+
span{
|
|
215
|
+
padding: 5px 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
.closebtnroutedetail{
|
|
219
|
+
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.11);
|
|
220
|
+
border-radius: 100%;
|
|
221
|
+
width: 30px;
|
|
222
|
+
height: 30px;
|
|
223
|
+
display: flex;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
align-items: center;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
background: #fff;
|
|
228
|
+
position: absolute;
|
|
229
|
+
top: -11px;
|
|
230
|
+
left: -11px;
|
|
231
|
+
}
|
|
232
|
+
.routenotes{
|
|
233
|
+
max-height: 170px;
|
|
234
|
+
overflow: auto;
|
|
235
|
+
}
|
|
@@ -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
|
+
});
|