Skip to content

Commit

Permalink
feat: synchronizeOrder route with obiz SOAP service
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Nov 6, 2024
1 parent a700a50 commit c1bb349
Show file tree
Hide file tree
Showing 8 changed files with 8,440 additions and 1 deletion.
23 changes: 23 additions & 0 deletions webapp/src/pages/dashboard/test-sync.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Button, Center } from "@chakra-ui/react";
import { api } from "~/utils/api";

export default function TextSync() {
const { mutateAsync: mutateOrderSync } =
api.order.synchronizeOrder.useMutation({});

return (
<Center h="full" w="full" px={10}>
<Button
colorScheme="blackBtn"
w="full"
onClick={() => {
mutateOrderSync({
order_id: 5,
});
}}
>
SYNCHRONIZE
</Button>
</Center>
);
}
10 changes: 10 additions & 0 deletions webapp/src/payload/collections/Order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,19 @@ export const Orders: CollectionConfig = {
{ label: "En attente de paiement", value: "awaiting_payment" },
{ label: "Payée", value: "payment_completed" },
{ label: "Livrée", value: "delivered" },
{ label: "Archivée", value: "archived" },
],
required: true,
},
{
name: "obiz_status",
type: "text",
label: "État Obiz",
admin: {
condition: (_, siblingData) =>
!!siblingData.status && siblingData.status === "archived",
},
},
{
name: "payment_url",
type: "text",
Expand Down
Loading

0 comments on commit c1bb349

Please sign in to comment.