@movalib/movalib-commons 1.64.4 → 1.64.5
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.
|
@@ -58,11 +58,10 @@ export default class Garage {
|
|
|
58
58
|
billingActive?: boolean;
|
|
59
59
|
billingToken?: string;
|
|
60
60
|
billingSimulationActive?: boolean;
|
|
61
|
-
demoBillingActive?: boolean;
|
|
62
61
|
appId?: number;
|
|
63
62
|
quoteRequestStart?: Date;
|
|
64
63
|
companyRegistrationNumber?: string;
|
|
65
64
|
establishmentRegistrationNumber?: string;
|
|
66
65
|
reopeningDate?: Date;
|
|
67
|
-
constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], dayPeriodFastServiceExcluded: boolean, loanerVehicleFastServiceExcluded: boolean, fastServiceThreshold: number, timezone: string, vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number, mailCustomization?: boolean, billingActive?: boolean, billingToken?: string, billingSimulationActive?: boolean, appId?: number, establishmentRegistrationNumber?: string, companyRegistrationNumber?: string, quoteRequestStart?: Date, reopeningDate?: Date
|
|
66
|
+
constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], dayPeriodFastServiceExcluded: boolean, loanerVehicleFastServiceExcluded: boolean, fastServiceThreshold: number, timezone: string, vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number, mailCustomization?: boolean, billingActive?: boolean, billingToken?: string, billingSimulationActive?: boolean, appId?: number, establishmentRegistrationNumber?: string, companyRegistrationNumber?: string, quoteRequestStart?: Date, reopeningDate?: Date);
|
|
68
67
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Garage = /** @class */ (function () {
|
|
4
|
-
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce, mailCustomization, billingActive, billingToken, billingSimulationActive, appId, establishmentRegistrationNumber, companyRegistrationNumber, quoteRequestStart, reopeningDate
|
|
4
|
+
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce, mailCustomization, billingActive, billingToken, billingSimulationActive, appId, establishmentRegistrationNumber, companyRegistrationNumber, quoteRequestStart, reopeningDate) {
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.adminId = adminId;
|
|
7
7
|
this.name = name;
|
|
@@ -35,7 +35,6 @@ var Garage = /** @class */ (function () {
|
|
|
35
35
|
this.companyRegistrationNumber = companyRegistrationNumber;
|
|
36
36
|
this.establishmentRegistrationNumber = establishmentRegistrationNumber;
|
|
37
37
|
this.reopeningDate = reopeningDate;
|
|
38
|
-
this.demoBillingActive = demoBillingActive;
|
|
39
38
|
}
|
|
40
39
|
return Garage;
|
|
41
40
|
}());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Gender } from "../helpers/Enums";
|
|
2
|
-
import Address from
|
|
2
|
+
import Address from "./Address";
|
|
3
3
|
import Garage from "./Garage";
|
|
4
4
|
import Role from "./Role";
|
|
5
5
|
import Vehicle from "./Vehicle";
|
|
@@ -11,16 +11,16 @@ export default class User {
|
|
|
11
11
|
avatar: string;
|
|
12
12
|
password: string;
|
|
13
13
|
created: Date;
|
|
14
|
+
billingAddress?: Address;
|
|
14
15
|
email?: string;
|
|
15
16
|
gender?: Gender;
|
|
16
17
|
birthDate?: Date;
|
|
17
|
-
addresses?: Address[];
|
|
18
18
|
phoneNumber?: string;
|
|
19
19
|
vehicles?: Vehicle[];
|
|
20
20
|
isActive?: Boolean;
|
|
21
21
|
hasPassword?: Boolean;
|
|
22
22
|
garages?: Garage[];
|
|
23
|
-
constructor(id: string, roles: Role[], firstname?: string, lastname?: string, avatar?: string, password?: string, created?: Date, email?: string, gender?: Gender, birthDate?: Date,
|
|
23
|
+
constructor(id: string, roles: Role[], firstname?: string, lastname?: string, avatar?: string, password?: string, created?: Date, billingAddress?: Address, email?: string, gender?: Gender, birthDate?: Date, phoneNumber?: string, vehicles?: Vehicle[], isActive?: Boolean, hasPassword?: Boolean, garages?: Garage[]);
|
|
24
24
|
static getFirstLetter: (user: User) => string;
|
|
25
25
|
static isGarageCustomer: (user: User) => boolean;
|
|
26
26
|
static isGarageTechnician: (user: User) => boolean;
|
package/dist/src/models/User.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Enums_1 = require("../helpers/Enums");
|
|
4
4
|
var User = /** @class */ (function () {
|
|
5
|
-
function User(id, roles, firstname, lastname, avatar, password, created, email, gender, birthDate,
|
|
6
|
-
if (firstname === void 0) { firstname =
|
|
7
|
-
if (lastname === void 0) { lastname =
|
|
8
|
-
if (avatar === void 0) { avatar =
|
|
9
|
-
if (password === void 0) { password =
|
|
5
|
+
function User(id, roles, firstname, lastname, avatar, password, created, billingAddress, email, gender, birthDate, phoneNumber, vehicles, isActive, hasPassword, garages) {
|
|
6
|
+
if (firstname === void 0) { firstname = ""; }
|
|
7
|
+
if (lastname === void 0) { lastname = ""; }
|
|
8
|
+
if (avatar === void 0) { avatar = ""; }
|
|
9
|
+
if (password === void 0) { password = ""; }
|
|
10
10
|
if (created === void 0) { created = new Date(); }
|
|
11
11
|
this.id = id;
|
|
12
12
|
this.roles = roles;
|
|
@@ -18,7 +18,7 @@ var User = /** @class */ (function () {
|
|
|
18
18
|
this.created = created;
|
|
19
19
|
this.gender = gender;
|
|
20
20
|
this.birthDate = birthDate;
|
|
21
|
-
this.
|
|
21
|
+
this.billingAddress = billingAddress;
|
|
22
22
|
this.phoneNumber = phoneNumber;
|
|
23
23
|
this.vehicles = vehicles;
|
|
24
24
|
this.isActive = isActive;
|
|
@@ -27,7 +27,7 @@ var User = /** @class */ (function () {
|
|
|
27
27
|
}
|
|
28
28
|
User.getFirstLetter = function (user) {
|
|
29
29
|
var firstLetter = user.lastname[0].toUpperCase();
|
|
30
|
-
return /[0-9]/.test(firstLetter) ?
|
|
30
|
+
return /[0-9]/.test(firstLetter) ? "0-9" : firstLetter;
|
|
31
31
|
};
|
|
32
32
|
User.isGarageCustomer = function (user) {
|
|
33
33
|
if (!user || !user.roles)
|
|
@@ -8,7 +8,6 @@ export default class GarageService {
|
|
|
8
8
|
static toogleUrgentQuote(garageId: string, quoteId: string): Promise<APIResponse<string>>;
|
|
9
9
|
static updatePaymentAuthorization(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
10
10
|
static toogleGaragePaymentAuthorization(garageId: string): Promise<APIResponse<string>>;
|
|
11
|
-
static toogleGarageSimulationDemoBilling(garageId: string): Promise<APIResponse<string>>;
|
|
12
11
|
static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
13
12
|
static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
|
|
14
13
|
static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
@@ -38,13 +38,6 @@ var GarageService = /** @class */ (function () {
|
|
|
38
38
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
GarageService.toogleGarageSimulationDemoBilling = function (garageId) {
|
|
42
|
-
return (0, ApiHelper_1.request)({
|
|
43
|
-
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/demo-billing/toggle"),
|
|
44
|
-
method: Enums_1.APIMethod.PATCH,
|
|
45
|
-
appType: Enums_1.MovaAppType.GARAGE,
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
41
|
GarageService.toogleEventVehicleReceived = function (garageId, eventId) {
|
|
49
42
|
return (0, ApiHelper_1.request)({
|
|
50
43
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/vehicle-received"),
|