Checkpoint: Ajout du bouton Validation BAP dans la page Factures BAP : nouveau champ bapValidated/bapValidatedAt dans le schéma, migration DB, route tRPC validateBAP avec vérification des critères (Score 100%, non exportée, isSubscription=0, service+typeAchat+ventilation remplis), bouton vert actif/désactivé avec tooltip explicatif, badge "Validé" pour les factures déjà validées
This commit is contained in:
2
drizzle/0012_left_madame_web.sql
Normal file
2
drizzle/0012_left_madame_web.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `invoices` ADD `bapValidated` int DEFAULT 0 NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `invoices` ADD `bapValidatedAt` timestamp;
|
||||
1303
drizzle/meta/0012_snapshot.json
Normal file
1303
drizzle/meta/0012_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -85,6 +85,13 @@
|
||||
"when": 1770971673626,
|
||||
"tag": "0011_woozy_sabretooth",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 12,
|
||||
"version": "5",
|
||||
"when": 1772788503373,
|
||||
"tag": "0012_left_madame_web",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -99,6 +99,10 @@ export const invoices = mysqlTable("invoices", {
|
||||
// Subscription flag
|
||||
isSubscription: int("isSubscription").default(0).notNull(), // 0 = NON, 1 = OUI
|
||||
|
||||
// BAP Validation
|
||||
bapValidated: int("bapValidated").default(0).notNull(), // 0 = non validé, 1 = validé BAP
|
||||
bapValidatedAt: timestamp("bapValidatedAt"), // Date de validation BAP
|
||||
|
||||
// SFTP Export tracking
|
||||
exportedAt: timestamp("exportedAt"),
|
||||
exportMode: mysqlEnum("exportMode", ["manual", "automatic"]),
|
||||
|
||||
Reference in New Issue
Block a user