refactor: Mise à jour de la doc swagger / URL

This commit is contained in:
N3WT DE COMPET
2025-02-13 21:59:25 +01:00
parent cce78355a3
commit 4c95b6a83f
13 changed files with 326 additions and 359 deletions

View File

@ -5,6 +5,8 @@ import Popup from '@/components/Popup';
import CheckBox from '@/components/CheckBox';
import InputText from '@/components/InputText';
import { ESTABLISHMENT_ID } from '@/utils/Url';
const DiscountsSection = ({ discounts, setDiscounts, handleCreate, handleEdit, handleDelete, type, subscriptionMode = false, selectedDiscounts, handleDiscountSelection }) => {
const [editingDiscount, setEditingDiscount] = useState(null);
const [newDiscount, setNewDiscount] = useState(null);
@ -17,7 +19,7 @@ const DiscountsSection = ({ discounts, setDiscounts, handleCreate, handleEdit, h
const [removePopupOnConfirm, setRemovePopupOnConfirm] = useState(() => {});
const handleAddDiscount = () => {
setNewDiscount({ id: Date.now(), name: '', amount: '', description: '', discount_type: 0, type: type });
setNewDiscount({ id: Date.now(), name: '', amount: '', description: '', discount_type: 0, type: type, establishment: ESTABLISHMENT_ID });
};
const handleRemoveDiscount = (id) => {