@movalib/movalib-commons 1.64.1 → 1.64.2
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/.github/workflows/main.yml +24 -0
- package/dist/src/models/Event.d.ts +2 -1
- package/dist/src/models/Event.js +2 -1
- package/dist/src/services/GarageService.d.ts +1 -0
- package/dist/src/services/GarageService.js +7 -0
- package/package.json +2 -1
- package/src/models/Event.ts +4 -1
- package/src/services/GarageService.ts +9 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Publish to GitHub Packages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: # déclenchement manuel uniquement
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
packages: write
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-node@v3
|
|
15
|
+
with:
|
|
16
|
+
node-version: 18.20.8
|
|
17
|
+
registry-url: https://npm.pkg.github.com/
|
|
18
|
+
scope: "@movalib"
|
|
19
|
+
|
|
20
|
+
- run: npm ci
|
|
21
|
+
|
|
22
|
+
- run: npm publish
|
|
23
|
+
env:
|
|
24
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -83,7 +83,8 @@ export default class Event {
|
|
|
83
83
|
updatedDate?: Date;
|
|
84
84
|
quoteFirstSendingTime?: Date;
|
|
85
85
|
lastQuoteCreationDate?: Date;
|
|
86
|
-
|
|
86
|
+
urgent?: boolean;
|
|
87
|
+
constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageId: number, color: string, state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[], guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean, resourceId?: number, garageVehicleId?: number, garageVehicleRequest?: boolean, vehicleAvailableNotificationTime?: Date, interventionEndTime?: Date, quoteLastSendingTime?: Date, invoiceSendingDate?: Date, orders?: order[], vehicleLoanStart?: Date, vehicleLoanEnd?: Date, creationDate?: Date, updatedDate?: Date, lastQuoteCreationDate?: Date, quoteFirstSendingTime?: Date, urgent?: boolean);
|
|
87
88
|
static getPrestationsList(event: Event): string[];
|
|
88
89
|
static getCurrentQuote(event: Event): Document | null;
|
|
89
90
|
}
|
package/dist/src/models/Event.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Enums_1 = require("../helpers/Enums");
|
|
4
4
|
var Event = /** @class */ (function () {
|
|
5
|
-
function Event(id, ownerId, type, title, garageName, garageId, color, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified, editable, resourceId, garageVehicleId, garageVehicleRequest, vehicleAvailableNotificationTime, interventionEndTime, quoteLastSendingTime, invoiceSendingDate, orders, vehicleLoanStart, vehicleLoanEnd, creationDate, updatedDate, lastQuoteCreationDate, quoteFirstSendingTime) {
|
|
5
|
+
function Event(id, ownerId, type, title, garageName, garageId, color, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified, editable, resourceId, garageVehicleId, garageVehicleRequest, vehicleAvailableNotificationTime, interventionEndTime, quoteLastSendingTime, invoiceSendingDate, orders, vehicleLoanStart, vehicleLoanEnd, creationDate, updatedDate, lastQuoteCreationDate, quoteFirstSendingTime, urgent) {
|
|
6
6
|
this.id = id;
|
|
7
7
|
this.notes = notes;
|
|
8
8
|
this.ownerId = ownerId;
|
|
@@ -51,6 +51,7 @@ var Event = /** @class */ (function () {
|
|
|
51
51
|
this.quoteFirstSendingTime = quoteFirstSendingTime
|
|
52
52
|
? new Date(quoteFirstSendingTime)
|
|
53
53
|
: undefined;
|
|
54
|
+
this.urgent = urgent;
|
|
54
55
|
}
|
|
55
56
|
Event.getPrestationsList = function (event) {
|
|
56
57
|
if (event && event.prestations) {
|
|
@@ -5,6 +5,7 @@ import Operation from "../models/Operation";
|
|
|
5
5
|
import Product from "../models/Product";
|
|
6
6
|
import { AddCustomerVehicleParams, DeleteCustomerVehicleParams } from "./GarageService.types";
|
|
7
7
|
export default class GarageService {
|
|
8
|
+
static toogleUrgentQuote(garageId: string, quoteId: string): Promise<APIResponse<string>>;
|
|
8
9
|
static updatePaymentAuthorization(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
9
10
|
static toogleGaragePaymentAuthorization(garageId: string): Promise<APIResponse<string>>;
|
|
10
11
|
static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
@@ -16,6 +16,13 @@ var Enums_1 = require("../helpers/Enums");
|
|
|
16
16
|
var GarageService = /** @class */ (function () {
|
|
17
17
|
function GarageService() {
|
|
18
18
|
}
|
|
19
|
+
GarageService.toogleUrgentQuote = function (garageId, quoteId) {
|
|
20
|
+
return (0, ApiHelper_1.request)({
|
|
21
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/quotes/").concat(quoteId, "/urgent"),
|
|
22
|
+
method: Enums_1.APIMethod.PATCH,
|
|
23
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
19
26
|
GarageService.updatePaymentAuthorization = function (garageId, req) {
|
|
20
27
|
return (0, ApiHelper_1.request)({
|
|
21
28
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/settings/payment-authorization/update"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movalib/movalib-commons",
|
|
3
|
-
"version": "1.64.
|
|
3
|
+
"version": "1.64.2",
|
|
4
4
|
"description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"start": "webpack-dev-server --entry ./devIndex.tsx --open",
|
|
10
10
|
"build": "rm -rf dist && tsc && npm run copy-assets",
|
|
11
|
+
"build:publish": "rm -rf dist && tsc && npm run copy-assets && npm publish",
|
|
11
12
|
"copy-assets": "cp -r src/assets/ dist/src/assets/ && cp -r src/style/. dist/src/style/",
|
|
12
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
14
|
"clean": "rm -rf dist node_modules package-lock.json",
|
package/src/models/Event.ts
CHANGED
|
@@ -94,6 +94,7 @@ export default class Event {
|
|
|
94
94
|
updatedDate?: Date;
|
|
95
95
|
quoteFirstSendingTime?: Date;
|
|
96
96
|
lastQuoteCreationDate?: Date;
|
|
97
|
+
urgent?: boolean;
|
|
97
98
|
constructor(
|
|
98
99
|
id: string,
|
|
99
100
|
ownerId: number,
|
|
@@ -128,7 +129,8 @@ export default class Event {
|
|
|
128
129
|
creationDate?: Date,
|
|
129
130
|
updatedDate?: Date,
|
|
130
131
|
lastQuoteCreationDate?: Date,
|
|
131
|
-
quoteFirstSendingTime?: Date
|
|
132
|
+
quoteFirstSendingTime?: Date,
|
|
133
|
+
urgent?: boolean
|
|
132
134
|
) {
|
|
133
135
|
this.id = id;
|
|
134
136
|
this.notes = notes;
|
|
@@ -178,6 +180,7 @@ export default class Event {
|
|
|
178
180
|
this.quoteFirstSendingTime = quoteFirstSendingTime
|
|
179
181
|
? new Date(quoteFirstSendingTime)
|
|
180
182
|
: undefined;
|
|
183
|
+
this.urgent = urgent
|
|
181
184
|
}
|
|
182
185
|
|
|
183
186
|
static getPrestationsList(event: Event): string[] {
|
|
@@ -10,6 +10,15 @@ import {
|
|
|
10
10
|
} from "./GarageService.types";
|
|
11
11
|
|
|
12
12
|
export default class GarageService {
|
|
13
|
+
|
|
14
|
+
static toogleUrgentQuote(garageId: string, quoteId: string): Promise<APIResponse<string>> {
|
|
15
|
+
return request({
|
|
16
|
+
url: `${API_BASE_URL}/garage/${garageId}/quotes/${quoteId}/urgent`,
|
|
17
|
+
method: APIMethod.PATCH,
|
|
18
|
+
appType: MovaAppType.GARAGE,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
static updatePaymentAuthorization(
|
|
14
23
|
garageId: string,
|
|
15
24
|
req: any
|