@asumano/worklip-typeorm-db 1.1.63 → 1.1.65
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.
|
@@ -161,7 +161,7 @@ __decorate([
|
|
|
161
161
|
default: 1,
|
|
162
162
|
type: "int",
|
|
163
163
|
width: 1,
|
|
164
|
-
comment: "Estado en el que se encuentra la orden de servicio:\n1. En edición: El concesionario está editando la orden de servicio.\n2. Finalizado: La orden de servicio ya se encuentra finalizada.",
|
|
164
|
+
comment: "Estado en el que se encuentra la orden de servicio:\n1. En edición: El concesionario está editando la orden de servicio.\n2. Finalizado: La orden de servicio ya se encuentra finalizada.\n3. Cancelada: El concesionario la anuló. No se edita ni se finaliza, el cliente no puede responder su cotización y sus recordatorios pendientes quedan cancelados. Se puede reactivar (vuelve a 1).",
|
|
165
165
|
}),
|
|
166
166
|
__metadata("design:type", Number)
|
|
167
167
|
], ServiceOrder.prototype, "status", void 0);
|
package/dist/visit.summary.d.ts
CHANGED
|
@@ -18,6 +18,14 @@ export interface IVisitEvidence {
|
|
|
18
18
|
visible: boolean;
|
|
19
19
|
createdAt: number;
|
|
20
20
|
capturedAt?: number | null;
|
|
21
|
+
purged?: boolean;
|
|
22
|
+
purged_at?: string;
|
|
23
|
+
}
|
|
24
|
+
export type TReminderApproval = "PENDING" | "APPROVED" | "REJECTED";
|
|
25
|
+
export interface IVisitItemReminder {
|
|
26
|
+
approval: TReminderApproval;
|
|
27
|
+
responded_at?: number | null;
|
|
28
|
+
reminder_id?: number | null;
|
|
21
29
|
}
|
|
22
30
|
export interface IVisitItem {
|
|
23
31
|
id: string;
|
|
@@ -29,6 +37,7 @@ export interface IVisitItem {
|
|
|
29
37
|
status: TItemStatus;
|
|
30
38
|
comments: string;
|
|
31
39
|
appointment_reminder?: string | Date | null;
|
|
40
|
+
reminder?: IVisitItemReminder | null;
|
|
32
41
|
costs: IVisitCosts | null;
|
|
33
42
|
evidence: IVisitEvidence[];
|
|
34
43
|
order: number;
|
|
@@ -40,10 +49,30 @@ export interface IVisitSection {
|
|
|
40
49
|
items: IVisitItem[];
|
|
41
50
|
custom_section?: boolean;
|
|
42
51
|
}
|
|
52
|
+
export interface IVisitSignature {
|
|
53
|
+
image: string;
|
|
54
|
+
signed_at: string;
|
|
55
|
+
name: string;
|
|
56
|
+
document: string;
|
|
57
|
+
source?: "workshop" | "report";
|
|
58
|
+
}
|
|
59
|
+
export interface IVisitSignatures {
|
|
60
|
+
mechanic?: IVisitSignature | null;
|
|
61
|
+
client?: IVisitSignature | null;
|
|
62
|
+
}
|
|
63
|
+
export interface IVisitPdf {
|
|
64
|
+
key: string;
|
|
65
|
+
generated_at?: string;
|
|
66
|
+
size_bytes?: number;
|
|
67
|
+
images?: number;
|
|
68
|
+
archived_at?: string;
|
|
69
|
+
}
|
|
43
70
|
export interface IVisitData {
|
|
44
71
|
sections: IVisitSection[];
|
|
45
72
|
summary?: IVisitSummary;
|
|
46
73
|
service_tax_mode?: TTaxMode;
|
|
74
|
+
signatures?: IVisitSignatures;
|
|
75
|
+
pdf?: IVisitPdf;
|
|
47
76
|
}
|
|
48
77
|
export interface IVisitQuotationSummary {
|
|
49
78
|
servicePrice: number;
|
|
@@ -83,7 +112,7 @@ export interface IPropsBuildVisitSummary {
|
|
|
83
112
|
export declare const isItemAnsweredByClient: (costs: {
|
|
84
113
|
approval?: TCostApproval | null;
|
|
85
114
|
} | null | undefined) => boolean;
|
|
86
|
-
export declare const buildVisitSummary: (data: IVisitData | null | undefined, { servicePrice, taxPercentage, isTaxIncluded }: IPropsBuildVisitSummary) => IVisitSummary;
|
|
115
|
+
export declare const buildVisitSummary: (data: Pick<IVisitData, "sections" | "service_tax_mode"> | null | undefined, { servicePrice, taxPercentage, isTaxIncluded }: IPropsBuildVisitSummary) => IVisitSummary;
|
|
87
116
|
export declare const getTaxConfig: (companyDetails: any) => {
|
|
88
117
|
taxPercentage: number;
|
|
89
118
|
isTaxIncluded: boolean;
|
package/dist/visit.summary.js
CHANGED
|
@@ -40,7 +40,15 @@ const isItemAnsweredByClient = (costs) => {
|
|
|
40
40
|
return (costs.approval ?? "PENDING") !== "PENDING";
|
|
41
41
|
};
|
|
42
42
|
exports.isItemAnsweredByClient = isItemAnsweredByClient;
|
|
43
|
-
const buildVisitSummary = (
|
|
43
|
+
const buildVisitSummary = (
|
|
44
|
+
// DOC: Pide solo lo que USA, y no un `IVisitData` completo. Dos razones:
|
|
45
|
+
// · dice de qué depende de verdad el resumen: los ítems y el modo de impuesto del
|
|
46
|
+
// servicio. Nada más de la visita lo mueve;
|
|
47
|
+
// · el formulario del front no es un `IVisitData` exacto —una firma recién dibujada
|
|
48
|
+
// todavía no tiene fecha ni nombre, que los pone el servidor al guardar—, y exigirle
|
|
49
|
+
// el tipo entero obligaba a un `as any` en la pantalla, que es justo donde no se
|
|
50
|
+
// quiere apagar el compilador.
|
|
51
|
+
data, { servicePrice, taxPercentage, isTaxIncluded }) => {
|
|
44
52
|
const statusCounts = {
|
|
45
53
|
GOOD: 0,
|
|
46
54
|
REGULAR: 0,
|