mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-24 15:38:18 +02:00
fix(types): bring real code to zero TypeScript errors, fix three latent bugs
Continues the cleanup from 164 errors down to 88, all of which now sit in MemStorage — the in-memory dev mock — documented as known debt. Production server code and the entire client are at zero errors. Three genuine defects surfaced by the types and fixed: - deleteAnnouncement returned void while routes check the result and answer 404 "not found" on falsy: deleting an announcement succeeded in DB but the API reported failure on the fallback paths; it now returns a real boolean - AnnouncementMemoryStorage declared getAnnouncement twice; the first implementation was dead at runtime (second definition wins) and is removed - one route called storage.getDeliveryById(), a method that does not exist, crashing with a TypeError whenever hit; it now calls getDelivery() Everything else is type-level only (annotations, null-to-undefined for inline styles, honest signatures for markClientCalled's comment parameter and the invoice verification result's invoiceAmountTTC field), verified behavior-neutral: client build, production server bundle and the SMTP end-to-end test all pass unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHdE9nEh8zHhQNGpCgrtYe
This commit is contained in:
19 files changed
+94
-101
No files matched your search
@@ -424,7 +424,7 @@ export default function Groups() {
|
||||
<div className="flex items-center">
|
||||
<div
|
||||
className="w-10 h-10 flex items-center justify-center mr-3"
|
||||
style={{ backgroundColor: group.color }}
|
||||
style={{ backgroundColor: group.color || undefined }}
|
||||
>
|
||||
<Users className="w-5 h-5 text-white" />
|
||||
</div>
|
||||
@@ -459,7 +459,7 @@ export default function Groups() {
|
||||
<div className="flex items-center">
|
||||
<div
|
||||
className="w-4 h-4 rounded mr-2"
|
||||
style={{ backgroundColor: group.color }}
|
||||
style={{ backgroundColor: group.color || undefined }}
|
||||
/>
|
||||
<span className="text-sm text-gray-600">{group.color}</span>
|
||||
</div>
|
||||
@@ -503,14 +503,7 @@ export default function Groups() {
|
||||
setShowCreateModal(false);
|
||||
setShowEditModal(false);
|
||||
setSelectedGroup(null);
|
||||
setFormData({
|
||||
name: "",
|
||||
color: "#1976D2",
|
||||
nocodbConfigId: "",
|
||||
nocodbTableId: "",
|
||||
nocodbTableName: "",
|
||||
invoiceColumnName: "Ref Facture",
|
||||
});
|
||||
setFormData({ ...EMPTY_GROUP_FORM, invoiceColumnName: "Ref Facture" });
|
||||
}}>
|
||||
<DialogContent className="sm:max-w-md" aria-describedby="group-modal-description">
|
||||
<DialogHeader>
|
||||
|
||||
Reference in new issue
Block a user