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>
-2
View File
@@ -4,7 +4,6 @@ export interface Sale {
// Vendeur
vendeur: string;
dateVente: string;
// Produit
typeArticle: string;
@@ -32,7 +31,6 @@ export interface Sale {
export interface FormData {
vendeur: string;
dateVente: string;
typeArticle: string;
categorie: string;
quantite: string;
+2
View File
@@ -238,6 +238,8 @@ Preferred communication style: Simple, everyday language.
- ✅ Removed section borders for cleaner design with color-coded backgrounds
- ✅ Added border to reset button for better visibility
- ✅ Optimized border thickness for better balance between visibility and aesthetics
- ✅ Removed manual date field from new sale form - timestamp now automatically recorded
- ✅ Automatic date/time creation ensures accuracy and prevents manual entry errors
### Docker Configuration & Cleanup (January 9, 2025)
- ✅ Complete Docker setup optimized for external PostgreSQL database
-1
View File
@@ -60,7 +60,6 @@ export const sales = pgTable("sales", {
// Vendeur
vendeur: varchar("vendeur", { length: 255 }).notNull(),
dateVente: varchar("date_vente", { length: 10 }).notNull(),
// Produit
typeArticle: varchar("type_article", { length: 255 }).notNull(),