Improve how payment options and ID types are handled in the sales form

Refactors IDENTITY_TYPES and PAYMENT_METHODS to string arrays and adds keys to SelectItem components in NewSaleFormMultiProduct.tsx.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: c7151ec8-4e6b-4fcf-b628-65b094ac18fd
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/c7151ec8-4e6b-4fcf-b628-65b094ac18fd/0c6Tusu
This commit is contained in:
michaelschal committed 2025-07-19 12:55:09 +00:00
1 parent 2ad8acfb48
commit 4be6f23f1f
3 files changed
+12 -12

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

@@ -477,8 +477,8 @@ export default function NewSaleFormMultiProduct() {
</SelectTrigger>
</FormControl>
<SelectContent>
{PAYMENT_METHODS.map((method) => (
<SelectItem key={`payment-${method}`} value={method}>
{PAYMENT_METHODS.map((method, methodIndex) => (
<SelectItem key={`payment-method-${methodIndex}`} value={method}>
{method}
</SelectItem>
))}
@@ -511,8 +511,8 @@ export default function NewSaleFormMultiProduct() {
</SelectTrigger>
</FormControl>
<SelectContent>
{IDENTITY_TYPES.map((type) => (
<SelectItem key={`identity-${type}`} value={type}>
{IDENTITY_TYPES.map((type, typeIndex) => (
<SelectItem key={`identity-type-${typeIndex}`} value={type}>
{type}
</SelectItem>
))}
+8 -8
View File
@@ -81,15 +81,15 @@ export const ARTICLE_CATEGORY_MAPPING = {
} as const;
export const IDENTITY_TYPES = [
{ value: "CNI", label: "Carte Nationale d'Identité" },
{ value: "Passeport", label: "Passeport" },
{ value: "Permis de conduire", label: "Permis de conduire" }
"Carte Nationale d'Identité",
"Passeport",
"Permis de conduire"
] as const;
export const PAYMENT_METHODS = [
{ value: "Carte Bancaire", label: "Carte Bancaire" },
{ value: "Espèce", label: "Espèce" },
{ value: "Chèque", label: "Chèque" },
{ value: "Carte Cadeau", label: "Carte Cadeau" },
{ value: "Autre", label: "Autre" }
"Carte Bancaire",
"Espèce",
"Chèque",
"Carte Cadeau",
"Autre"
] as const;