feat: implement mobile credit notes management page with CRUD operations and filtering.

This commit is contained in:
Michael committed 2025-12-10 16:48:21 +01:00
1 parent 77bbeed9c0
commit e626659915
1 file changed
+43 -34
+43 -34
View File
@@ -346,45 +346,54 @@ export default function MobileAvoirsPage() {
/> />
</div> </div>
</FormItem> <FormField
control={form.control}
name="comment"
render={({ field }) => (
<FormItem>
<FormLabel>Commentaire / Raison</FormLabel>
<FormControl>
<Textarea placeholder="Erreur prix, manquant..." {...field} />
</FormControl>
</FormItem>
)} )}
/> />
<FormField <FormField
control={form.control} control={form.control}
name="commercialProcessed" name="commercialProcessed"
render={({ field }) => ( render={({ field }) => (
<FormItem className="flex flex-row items-center space-x-3 space-y-0 p-2 bg-gray-50 rounded mt-2"> <FormItem className="flex flex-row items-center space-x-3 space-y-0 p-2 bg-gray-50 rounded mt-2">
<FormControl> <FormControl>
<Checkbox <Checkbox
checked={field.value} checked={field.value}
onCheckedChange={field.onChange} onCheckedChange={field.onChange}
/> />
</FormControl> </FormControl>
<div className="space-y-1 leading-none"> <div className="space-y-1 leading-none">
<FormLabel className="font-normal text-sm text-gray-700"> <FormLabel className="font-normal text-sm text-gray-700">
Déjà traité par commercial Déjà traité par commercial
</FormLabel> </FormLabel>
</div> </div>
</FormItem> </FormItem>
)} )}
/> />
<Button type="submit" className="w-full bg-indigo-600 hover:bg-indigo-700 h-12 text-lg font-bold shadow-lg mt-4" disabled={createMutation.isPending}> <Button type="submit" className="w-full bg-indigo-600 hover:bg-indigo-700 h-12 text-lg font-bold shadow-lg mt-4" disabled={createMutation.isPending}>
{createMutation.isPending ? "Création..." : "Créer la demande"} {createMutation.isPending ? "Création..." : "Créer la demande"}
</Button> </Button>
</form> </form>
</Form> </Form>
</SheetContent> </SheetContent>
</Sheet> </Sheet>
{/* FAB */ } {/* FAB */}
<Button <Button
className="fixed bottom-20 right-4 h-14 w-14 rounded-full shadow-lg bg-indigo-600 hover:bg-indigo-700 p-0 flex items-center justify-center z-50" className="fixed bottom-20 right-4 h-14 w-14 rounded-full shadow-lg bg-indigo-600 hover:bg-indigo-700 p-0 flex items-center justify-center z-50"
onClick={() => setIsCreateOpen(true)} onClick={() => setIsCreateOpen(true)}
> >
<Plus className="h-6 w-6 text-white" /> <Plus className="h-6 w-6 text-white" />
</Button> </Button>
</MobileLayout > </MobileLayout >
); );
} }