mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-22 22:58:16 +02:00
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:
1 parent
c494735c8c
commit
fee34d6c4f
4 files changed
+3
-18
No files matched your search
@@ -133,7 +133,6 @@ export default function NewSaleForm() {
|
|||||||
|
|
||||||
const saleData = {
|
const saleData = {
|
||||||
vendeur: data.vendeur,
|
vendeur: data.vendeur,
|
||||||
dateVente: data.dateVente,
|
|
||||||
typeArticle: data.typeArticle,
|
typeArticle: data.typeArticle,
|
||||||
categorie: data.categorie as 'F2' | 'F3',
|
categorie: data.categorie as 'F2' | 'F3',
|
||||||
quantite: parseInt(data.quantite),
|
quantite: parseInt(data.quantite),
|
||||||
@@ -167,7 +166,7 @@ export default function NewSaleForm() {
|
|||||||
<User className="h-5 w-5" />
|
<User className="h-5 w-5" />
|
||||||
<span>Informations Vendeur</span>
|
<span>Informations Vendeur</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="vendeur"
|
name="vendeur"
|
||||||
@@ -181,19 +180,6 @@ export default function NewSaleForm() {
|
|||||||
</FormItem>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ export interface Sale {
|
|||||||
|
|
||||||
// Vendeur
|
// Vendeur
|
||||||
vendeur: string;
|
vendeur: string;
|
||||||
dateVente: string;
|
|
||||||
|
|
||||||
// Produit
|
// Produit
|
||||||
typeArticle: string;
|
typeArticle: string;
|
||||||
@@ -32,7 +31,6 @@ export interface Sale {
|
|||||||
|
|
||||||
export interface FormData {
|
export interface FormData {
|
||||||
vendeur: string;
|
vendeur: string;
|
||||||
dateVente: string;
|
|
||||||
typeArticle: string;
|
typeArticle: string;
|
||||||
categorie: string;
|
categorie: string;
|
||||||
quantite: string;
|
quantite: string;
|
||||||
|
|||||||
@@ -238,6 +238,8 @@ Preferred communication style: Simple, everyday language.
|
|||||||
- ✅ Removed section borders for cleaner design with color-coded backgrounds
|
- ✅ Removed section borders for cleaner design with color-coded backgrounds
|
||||||
- ✅ Added border to reset button for better visibility
|
- ✅ Added border to reset button for better visibility
|
||||||
- ✅ Optimized border thickness for better balance between visibility and aesthetics
|
- ✅ 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)
|
### Docker Configuration & Cleanup (January 9, 2025)
|
||||||
- ✅ Complete Docker setup optimized for external PostgreSQL database
|
- ✅ Complete Docker setup optimized for external PostgreSQL database
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ export const sales = pgTable("sales", {
|
|||||||
|
|
||||||
// Vendeur
|
// Vendeur
|
||||||
vendeur: varchar("vendeur", { length: 255 }).notNull(),
|
vendeur: varchar("vendeur", { length: 255 }).notNull(),
|
||||||
dateVente: varchar("date_vente", { length: 10 }).notNull(),
|
|
||||||
|
|
||||||
// Produit
|
// Produit
|
||||||
typeArticle: varchar("type_article", { length: 255 }).notNull(),
|
typeArticle: varchar("type_article", { length: 255 }).notNull(),
|
||||||
|
|||||||
Reference in new issue
Block a user