Remove manual date entry and automate timestamp for new sales records

Removes dateVente field from NewSaleForm, sale types, and shared schema.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/fa7f08e0-2cf1-49d3-8250-af23db9cc3bd.jpg
This commit is contained in:
michaelschal committed 2025-07-10 08:50:31 +00:00
1 parent c494735c8c
commit fee34d6c4f
4 files changed
+3 -18

No files matched your search

+1 -15
View File
@@ -133,7 +133,6 @@ export default function NewSaleForm() {
const saleData = {
vendeur: data.vendeur,
dateVente: data.dateVente,
typeArticle: data.typeArticle,
categorie: data.categorie as 'F2' | 'F3',
quantite: parseInt(data.quantite),
@@ -167,7 +166,7 @@ export default function NewSaleForm() {
<User className="h-5 w-5" />
<span>Informations Vendeur</span>
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div className="grid grid-cols-1 gap-4">
<FormField
control={form.control}
name="vendeur"
@@ -181,19 +180,6 @@ export default function NewSaleForm() {
</FormItem>
)}
/>
<FormField
control={form.control}
name="dateVente"
render={({ field }) => (
<FormItem>
<FormLabel>Date de vente <span className="text-destructive">*</span></FormLabel>
<FormControl>
<Input type="date" className="modern-input" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
</div>