..
This commit is contained in:
parent
b3c14b061b
commit
5f2afd0520
10
.vscode/launch.json
vendored
10
.vscode/launch.json
vendored
@ -2,12 +2,12 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "WEB: Run in Development Mode",
|
"name": "WEB: Vite (Chrome)",
|
||||||
"type": "node",
|
"type": "pwa-msedge",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"runtimeExecutable": "pnpm",
|
"url": "http://localhost:5173",
|
||||||
"runtimeArgs": ["run", "dev", "--filter", "web"],
|
"webRoot": "${workspaceFolder}/apps/web",
|
||||||
"console": "integratedTerminal"
|
"sourceMaps": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SERVER: Run in Development Mode",
|
"name": "SERVER: Run in Development Mode",
|
||||||
|
|||||||
20
.vscode/tasks.json
vendored
Normal file
20
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "web:dev",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "pnpm --filter web dev",
|
||||||
|
"isBackground": true,
|
||||||
|
"problemMatcher": {
|
||||||
|
"owner": "vite",
|
||||||
|
"pattern": [{ "regexp": "." }],
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": true,
|
||||||
|
"beginsPattern": ".*Local:.*http://.*:5173/.*",
|
||||||
|
"endsPattern": ".*ready in .*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -62,7 +62,20 @@ export const App = () => {
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
</UnsavedWarnProvider>
|
</UnsavedWarnProvider>
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
<Toaster position='top-right' />
|
<Toaster
|
||||||
|
toastOptions={
|
||||||
|
{
|
||||||
|
//unstyled: true,
|
||||||
|
/*classNames: {
|
||||||
|
error: "bg-red-400",
|
||||||
|
success: "text-green-400",
|
||||||
|
warning: "text-yellow-400",
|
||||||
|
info: "bg-blue-400",
|
||||||
|
},*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
position='bottom-center'
|
||||||
|
/>
|
||||||
{import.meta.env.DEV && <ReactQueryDevtools initialIsOpen={false} />}
|
{import.meta.env.DEV && <ReactQueryDevtools initialIsOpen={false} />}
|
||||||
</AuthProvider>
|
</AuthProvider>
|
||||||
</DataSourceProvider>
|
</DataSourceProvider>
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import path from "path";
|
import path from "node:path";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
sourcemap: true,
|
||||||
|
},
|
||||||
plugins: [react(), tailwindcss()],
|
plugins: [react(), tailwindcss()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"common": {
|
"common": {
|
||||||
|
"cancel": "Cancel",
|
||||||
"required": "•"
|
"required": "•"
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"common": {
|
"common": {
|
||||||
|
"cancel": "Cancelar",
|
||||||
"required": "•"
|
"required": "•"
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
"common": {
|
"common": {
|
||||||
"more_details": "More details",
|
"more_details": "More details",
|
||||||
"back_to_list": "Back to the list",
|
"back_to_list": "Back to the list",
|
||||||
|
"cancel": "Cancel",
|
||||||
"save": "Save"
|
"save": "Save"
|
||||||
},
|
},
|
||||||
"pages": {
|
"pages": {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
"common": {
|
"common": {
|
||||||
"more_details": "Más detalles",
|
"more_details": "Más detalles",
|
||||||
"back_to_list": "Back to the list",
|
"back_to_list": "Back to the list",
|
||||||
|
"cancel": "Cancelar",
|
||||||
"save": "Guardar"
|
"save": "Guardar"
|
||||||
},
|
},
|
||||||
"pages": {
|
"pages": {
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export const CustomersListGrid = () => {
|
|||||||
size='icon'
|
size='icon'
|
||||||
className='size-8'
|
className='size-8'
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`${data.id}/edit`, { relative: "path" });
|
navigate(`${data.id}/edit`, { relative: "route" });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ChevronRightIcon />
|
<ChevronRightIcon />
|
||||||
|
|||||||
@ -36,10 +36,11 @@ export const CustomerUpdate = () => {
|
|||||||
const handleSubmit = async (formData: CustomerUpdateData) => {
|
const handleSubmit = async (formData: CustomerUpdateData) => {
|
||||||
try {
|
try {
|
||||||
const result = await mutateAsync({ id: customerId!, data: formData });
|
const result = await mutateAsync({ id: customerId!, data: formData });
|
||||||
|
console.log(result);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
showSuccessToast(t("pages.update.successTitle"), t("pages.update.successMsg"));
|
showSuccessToast(t("pages.update.successTitle"), t("pages.update.successMsg"));
|
||||||
navigate("/customers/list");
|
navigate("/customers/list", { relative: "path" });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showErrorToast(t("pages.update.errorTitle"), (e as Error).message);
|
showErrorToast(t("pages.update.errorTitle"), (e as Error).message);
|
||||||
@ -94,7 +95,7 @@ export const CustomerUpdate = () => {
|
|||||||
<>
|
<>
|
||||||
<AppBreadcrumb />
|
<AppBreadcrumb />
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<div className='flex items-center justify-between space-y-4'>
|
<div className='flex items-center justify-between space-y-4 px-6'>
|
||||||
<div className='space-y-2'>
|
<div className='space-y-2'>
|
||||||
<h2 className='text-2xl font-bold tracking-tight text-balance scroll-m-2'>
|
<h2 className='text-2xl font-bold tracking-tight text-balance scroll-m-2'>
|
||||||
{t("pages.update.title")}
|
{t("pages.update.title")}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user