fix: fixed dialogs and db structure
This commit is contained in:
parent
8e4c9db75a
commit
fc729c6b77
26 changed files with 921 additions and 329 deletions
313
package-lock.json
generated
313
package-lock.json
generated
|
|
@ -202,6 +202,111 @@
|
||||||
"integrity": "sha512-2Zhvss36s/yL+YSxD5ZL5dz5pI6ki1OLxYlh6O77VJ68sBnlUrl5YqhBgCy7FkdMsp9RBeGFwpuDCdpJOqdKeQ==",
|
"integrity": "sha512-2Zhvss36s/yL+YSxD5ZL5dz5pI6ki1OLxYlh6O77VJ68sBnlUrl5YqhBgCy7FkdMsp9RBeGFwpuDCdpJOqdKeQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@next/swc-darwin-arm64": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-lYExGHuFIHeOxf40mRLWoA84iY2sLELB23BV5FIDHhdJkN1LpRTPc1MDOawgTo5ifbM5dvAwnGuHyNm60G1+jw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@next/swc-darwin-x64": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-cacs/WQqa96IhqUm+7CY+z/0j9sW6X80KE07v3IAJuv+z0UNvJtKSlT/T1w1SpaQRa9l0wCYYZlRZUhUOvEVmg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-tLd90SvkRFik6LSfuYjcJEmwqcNEnVYVOyKTacSazya/SLlSwy/VYKsDE4GIzOBd+h3gW+FXqShc2XBavccHCg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@next/swc-linux-arm64-musl": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-ekV76G2R/l3nkvylkfy9jBSYHeB4QcJ7LdDseT6INnn1p51bmDS1eGoSoq+RxfQ7B1wt+Qa0pIl5aqcx0GLpbw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@next/swc-linux-x64-gnu": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-tI+sBu+3FmWtqlqD4xKJcj3KJtqbniLombKTE7/UWyyoHmOyAo3aZ7QcEHIOgInXOG1nt0rwh0KGmNbvSB0Djg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@next/swc-linux-x64-musl": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-kDRh+epN/ulroNJLr+toDjN+/JClY5L+OAWjOrrKCI0qcKvTw9GBx7CU/rdA2bgi4WpZN3l0rf/3+b8rduEwrQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||||
|
"version": "15.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.5.tgz",
|
||||||
|
"integrity": "sha512-GDgdNPFFqiKjTrmfw01sMMRWhVN5wOCmFzPloxa7ksDfX6TZt62tAK986f0ZYqWpvDFqeBCLAzmgTURvtQBdgw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@next/swc-win32-x64-msvc": {
|
"node_modules/@next/swc-win32-x64-msvc": {
|
||||||
"version": "15.5.5",
|
"version": "15.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.5.tgz",
|
||||||
|
|
@ -1341,6 +1446,206 @@
|
||||||
"@tailwindcss/oxide-win32-x64-msvc": "4.1.14"
|
"@tailwindcss/oxide-win32-x64-msvc": "4.1.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-android-arm64": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-a94ifZrGwMvbdeAxWoSuGcIl6/DOP5cdxagid7xJv6bwFp3oebp7y2ImYsnZBMTwjn5Ev5xESvS3FFYUGgPODQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-darwin-arm64": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-HkFP/CqfSh09xCnrPJA7jud7hij5ahKyWomrC3oiO2U9i0UjP17o9pJbxUN0IJ471GTQQmzwhp0DEcpbp4MZTA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-darwin-x64": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-eVNaWmCgdLf5iv6Qd3s7JI5SEFBFRtfm6W0mphJYXgvnDEAZ5sZzqmI06bK6xo0IErDHdTA5/t7d4eTfWbWOFw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-freebsd-x64": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-QWLoRXNikEuqtNb0dhQN6wsSVVjX6dmUFzuuiL09ZeXju25dsei2uIPl71y2Ic6QbNBsB4scwBoFnlBfabHkEw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-VB4gjQni9+F0VCASU+L8zSIyjrLLsy03sjcR3bM0V2g4SNamo0FakZFKyUQ96ZVwGK4CaJsc9zd/obQy74o0Fw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-qaEy0dIZ6d9vyLnmeg24yzA8XuEAD9WjpM5nIM1sUgQ/Zv7cVkharPDQcmm/t/TvXoKo/0knI3me3AGfdx6w1w==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-linux-arm64-musl": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-ISZjT44s59O8xKsPEIesiIydMG/sCXoMBCqsphDm/WcbnuWLxxb+GcvSIIA5NjUw6F8Tex7s5/LM2yDy8RqYBQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-linux-x64-gnu": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-02c6JhLPJj10L2caH4U0zF8Hji4dOeahmuMl23stk0MU1wfd1OraE7rOloidSF8W5JTHkFdVo/O7uRUJJnUAJg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-linux-x64-musl": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-TNGeLiN1XS66kQhxHG/7wMeQDOoL0S33x9BgmydbrWAb9Qw0KYdd8o1ifx4HOGDWhVmJ+Ul+JQ7lyknQFilO3Q==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-wasm32-wasi": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-uZYAsaW/jS/IYkd6EWPJKW/NlPNSkWkBlaeVBi/WsFQNP05/bzkebUL8FH1pdsqx4f2fH/bWFcUABOM9nfiJkQ==",
|
||||||
|
"bundleDependencies": [
|
||||||
|
"@napi-rs/wasm-runtime",
|
||||||
|
"@emnapi/core",
|
||||||
|
"@emnapi/runtime",
|
||||||
|
"@tybys/wasm-util",
|
||||||
|
"@emnapi/wasi-threads",
|
||||||
|
"tslib"
|
||||||
|
],
|
||||||
|
"cpu": [
|
||||||
|
"wasm32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@emnapi/core": "^1.5.0",
|
||||||
|
"@emnapi/runtime": "^1.5.0",
|
||||||
|
"@emnapi/wasi-threads": "^1.1.0",
|
||||||
|
"@napi-rs/wasm-runtime": "^1.0.5",
|
||||||
|
"@tybys/wasm-util": "^0.10.1",
|
||||||
|
"tslib": "^2.4.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
|
||||||
|
"version": "4.1.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.14.tgz",
|
||||||
|
"integrity": "sha512-Az0RnnkcvRqsuoLH2Z4n3JfAef0wElgzHD5Aky/e+0tBUxUhIeIqFBTMNQvmMRSP15fWwmvjBxZ3Q8RhsDnxAA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tailwindcss/oxide-win32-x64-msvc": {
|
"node_modules/@tailwindcss/oxide-win32-x64-msvc": {
|
||||||
"version": "4.1.14",
|
"version": "4.1.14",
|
||||||
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.14.tgz",
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.14.tgz",
|
||||||
|
|
@ -2377,11 +2682,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tar": {
|
"node_modules/tar": {
|
||||||
"version": "7.5.1",
|
"version": "7.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz",
|
||||||
"integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==",
|
"integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/fs-minipass": "^4.0.0",
|
"@isaacs/fs-minipass": "^4.0.0",
|
||||||
"chownr": "^3.0.0",
|
"chownr": "^3.0.0",
|
||||||
|
|
|
||||||
21
prisma/migrations/20251111124743_002/migration.sql
Normal file
21
prisma/migrations/20251111124743_002/migration.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- The primary key for the `Registratore` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "public"."Intervento" DROP CONSTRAINT "Intervento_id_registratore_fkey";
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Intervento" ALTER COLUMN "id_registratore" SET DATA TYPE TEXT;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Registratore" DROP CONSTRAINT "Registratore_pkey",
|
||||||
|
ALTER COLUMN "id" DROP DEFAULT,
|
||||||
|
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||||
|
ADD CONSTRAINT "Registratore_pkey" PRIMARY KEY ("id");
|
||||||
|
DROP SEQUENCE "Registratore_id_seq";
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Intervento" ADD CONSTRAINT "Intervento_id_registratore_fkey" FOREIGN KEY ("id_registratore") REFERENCES "Registratore"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
8
prisma/migrations/20251111124854_003/migration.sql
Normal file
8
prisma/migrations/20251111124854_003/migration.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `seriale` on the `Registratore` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Registratore" DROP COLUMN "seriale";
|
||||||
5
prisma/migrations/20251111125913_004/migration.sql
Normal file
5
prisma/migrations/20251111125913_004/migration.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- CreateEnum
|
||||||
|
CREATE TYPE "Modello" AS ENUM ('FORM100', 'FORM200', 'FORM500');
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Registratore" ADD COLUMN "modello" "Modello";
|
||||||
2
prisma/migrations/20251111130324_005/migration.sql
Normal file
2
prisma/migrations/20251111130324_005/migration.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterEnum
|
||||||
|
ALTER TYPE "Modello" ADD VALUE 'FORM200PLUS';
|
||||||
2
prisma/migrations/20251111140337_006/migration.sql
Normal file
2
prisma/migrations/20251111140337_006/migration.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Cliente" ADD COLUMN "coordinate" DOUBLE PRECISION[];
|
||||||
10
prisma/migrations/20251111161412_007/migration.sql
Normal file
10
prisma/migrations/20251111161412_007/migration.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `coordinate` on the `Cliente` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Cliente" DROP COLUMN "coordinate",
|
||||||
|
ADD COLUMN "lat" DOUBLE PRECISION,
|
||||||
|
ADD COLUMN "lon" DOUBLE PRECISION;
|
||||||
10
prisma/migrations/20251111164927_008/migration.sql
Normal file
10
prisma/migrations/20251111164927_008/migration.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- Made the column `lat` on table `Cliente` required. This step will fail if there are existing NULL values in that column.
|
||||||
|
- Made the column `lon` on table `Cliente` required. This step will fail if there are existing NULL values in that column.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Cliente" ALTER COLUMN "lat" SET NOT NULL,
|
||||||
|
ALTER COLUMN "lon" SET NOT NULL;
|
||||||
|
|
@ -8,9 +8,16 @@ datasource db {
|
||||||
url = env("DATABASE_URL")
|
url = env("DATABASE_URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum Modello {
|
||||||
|
FORM100
|
||||||
|
FORM200
|
||||||
|
FORM200PLUS
|
||||||
|
FORM500
|
||||||
|
}
|
||||||
|
|
||||||
model Intervento {
|
model Intervento {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
id_registratore Int
|
id_registratore String
|
||||||
data DateTime @db.Date
|
data DateTime @db.Date
|
||||||
lavoro String @db.Text
|
lavoro String @db.Text
|
||||||
fattura Boolean @db.Boolean
|
fattura Boolean @db.Boolean
|
||||||
|
|
@ -18,9 +25,9 @@ model Intervento {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Registratore {
|
model Registratore {
|
||||||
id Int @id @default(autoincrement())
|
id String @id
|
||||||
id_cliente Int
|
id_cliente Int
|
||||||
seriale String? @db.VarChar(255)
|
modello Modello?
|
||||||
data_acquisto DateTime? @db.Date
|
data_acquisto DateTime? @db.Date
|
||||||
ultima_verifica DateTime? @db.Date
|
ultima_verifica DateTime? @db.Date
|
||||||
prossima_verifica DateTime? @db.Date
|
prossima_verifica DateTime? @db.Date
|
||||||
|
|
@ -37,5 +44,7 @@ model Cliente {
|
||||||
sede String @db.VarChar(255)
|
sede String @db.VarChar(255)
|
||||||
sede_url String @db.VarChar(255)
|
sede_url String @db.VarChar(255)
|
||||||
contratto String @db.VarChar(255)
|
contratto String @db.VarChar(255)
|
||||||
|
lat Float
|
||||||
|
lon Float
|
||||||
registratori Registratore[]
|
registratori Registratore[]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
24
src/app/api/registratori/route.ts
Normal file
24
src/app/api/registratori/route.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { Modello, PrismaClient } from "@/generated/prisma";
|
||||||
|
|
||||||
|
export async function POST(request: Request) {
|
||||||
|
const prisma = new PrismaClient();
|
||||||
|
const data = await request.json();
|
||||||
|
|
||||||
|
await prisma.registratore.create({
|
||||||
|
data: {
|
||||||
|
id: data.seriale,
|
||||||
|
id_cliente: data.id,
|
||||||
|
data_acquisto: new Date(data.data),
|
||||||
|
modello:
|
||||||
|
data.modello === "FORM100"
|
||||||
|
? Modello.FORM100
|
||||||
|
: data.modello === "FORM200"
|
||||||
|
? Modello.FORM200
|
||||||
|
: data.modello === "FORM200PLUS"
|
||||||
|
? Modello.FORM200PLUS
|
||||||
|
: Modello.FORM500,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return Response.json({ message: "fatto bastardo" });
|
||||||
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ export default function Page() {
|
||||||
{cliente ? <ClientCard cliente={cliente} /> : <></>}
|
{cliente ? <ClientCard cliente={cliente} /> : <></>}
|
||||||
{registratori ? (
|
{registratori ? (
|
||||||
registratori.map((registratore) => (
|
registratori.map((registratore) => (
|
||||||
<DeviceCard registratore={registratore} />
|
<DeviceCard registratore={registratore} key={registratore.id} />
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,31 @@
|
||||||
|
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { Cliente } from "@/generated/prisma";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const MapWithNoSSR = dynamic(() => import("../../components/map"), {
|
const MapWithNoSSR = dynamic(() => import("../../components/map"), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
});
|
});
|
||||||
|
const [clienti, setClienti] = useState<Array<Cliente>>();
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const client = searchParams.get("client");
|
const client = searchParams.get("client");
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
async function getClienti() {
|
||||||
|
const req = await fetch(`/api/clienti`);
|
||||||
|
const data = await req.json();
|
||||||
|
console.log(data.clients);
|
||||||
|
setClienti(data.clients);
|
||||||
|
}
|
||||||
|
|
||||||
|
getClienti();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="map" className="w-full h-full border rounded-md m-0 p-0">
|
<div id="map" className="w-full h-full border rounded-md m-0 p-0">
|
||||||
<MapWithNoSSR highlight={client} />
|
<MapWithNoSSR highlight={client} clienti={clienti} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,16 @@ import { Plus } from "lucide-react";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import DatePicker from "./date-picker";
|
import DatePicker from "./date-picker";
|
||||||
import { Checkbox } from "@/components/ui/checkbox";
|
import { Checkbox } from "@/components/ui/checkbox";
|
||||||
|
|
||||||
const AddInterventoDialog = ({ id }: { id: Number }) => {
|
const AddInterventoDialog = ({ id }: { id: string }) => {
|
||||||
//const [nome, setNome] = useState("");
|
//const [nome, setNome] = useState("");
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [data, setData] = useState<Date | undefined>();
|
const [data, setData] = useState<Date | undefined>(new Date());
|
||||||
const [lavoro, setLavoro] = useState<string>("");
|
const [lavoro, setLavoro] = useState<string>("");
|
||||||
const [fattura, setFattura] = useState<Boolean>();
|
const [fattura, setFattura] = useState<Boolean>(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -75,15 +75,13 @@ const AddInterventoDialog = ({ id }: { id: Number }) => {
|
||||||
<div className="gap-3 flex items-center mt-2">
|
<div className="gap-3 flex items-center mt-2">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="fattura"
|
id="fattura"
|
||||||
onCheckedChange={(checked) =>
|
onCheckedChange={(checked) => {
|
||||||
setFattura(
|
checked === "indeterminate"
|
||||||
checked === "indeterminate"
|
? setFattura(false)
|
||||||
? false
|
: checked
|
||||||
: checked
|
? setFattura(true)
|
||||||
? true
|
: setFattura(false);
|
||||||
: true,
|
}}
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<Label htmlFor="fattura">Fattura</Label>
|
<Label htmlFor="fattura">Fattura</Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,25 +28,25 @@ const AddRegistratoreDialog = ({ id }: { id: Number }) => {
|
||||||
const [openData, setOpenData] = useState(false);
|
const [openData, setOpenData] = useState(false);
|
||||||
const [openModello, setOpenModello] = useState(false);
|
const [openModello, setOpenModello] = useState(false);
|
||||||
const [data, setData] = useState<Date | undefined>();
|
const [data, setData] = useState<Date | undefined>();
|
||||||
|
const [seriale, setSeriale] = useState<string>("");
|
||||||
const [modello, setModello] = useState<Date | undefined>();
|
const [modello, setModello] = useState<Date | undefined>();
|
||||||
const [lavoro, setLavoro] = useState<string>("");
|
|
||||||
const [fattura, setFattura] = useState<Boolean>();
|
const [fattura, setFattura] = useState<Boolean>();
|
||||||
|
|
||||||
const modelli = [
|
const modelli = [
|
||||||
{
|
{
|
||||||
value: "Form 100",
|
value: "FORM100",
|
||||||
label: "Form 100",
|
label: "Form 100",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "Form 200",
|
value: "FORM200",
|
||||||
label: "Form 200",
|
label: "Form 200",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "Form 200 Plus",
|
value: "FORM200PLUS",
|
||||||
label: "Form 200 Plus",
|
label: "Form 200 Plus",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "Form 500",
|
value: "FORM500",
|
||||||
label: "Form 500",
|
label: "Form 500",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -73,12 +73,12 @@ const AddRegistratoreDialog = ({ id }: { id: Number }) => {
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="grid gap-4">
|
<div className="grid gap-4">
|
||||||
<div className="grid gap-3">
|
<div className="grid gap-3">
|
||||||
<Label htmlFor="lavoro">Seriale</Label>
|
<Label htmlFor="seriale">Seriale</Label>
|
||||||
<Input
|
<Input
|
||||||
id="seriale"
|
id="seriale"
|
||||||
name="seriale"
|
name="seriale"
|
||||||
placeholder="Seriale"
|
placeholder="Seriale"
|
||||||
onChange={(e) => setLavoro(e.target.value)}
|
onChange={(e) => setSeriale(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid gap-3">
|
<div className="grid gap-3">
|
||||||
|
|
@ -100,21 +100,6 @@ const AddRegistratoreDialog = ({ id }: { id: Number }) => {
|
||||||
modelli={modelli}
|
modelli={modelli}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="gap-3 flex items-center mt-2">
|
|
||||||
<Checkbox
|
|
||||||
id="fattura"
|
|
||||||
onCheckedChange={(checked) =>
|
|
||||||
setFattura(
|
|
||||||
checked === "indeterminate"
|
|
||||||
? false
|
|
||||||
: checked
|
|
||||||
? true
|
|
||||||
: true,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<Label htmlFor="fattura">Fattura</Label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<DialogClose asChild>
|
<DialogClose asChild>
|
||||||
|
|
@ -122,13 +107,13 @@ const AddRegistratoreDialog = ({ id }: { id: Number }) => {
|
||||||
</DialogClose>
|
</DialogClose>
|
||||||
<Button
|
<Button
|
||||||
onClick={async () =>
|
onClick={async () =>
|
||||||
await fetch("/api/interventi", {
|
await fetch("/api/registratori", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
id: id,
|
id: id,
|
||||||
|
seriale: seriale,
|
||||||
data: data,
|
data: data,
|
||||||
fattura: fattura,
|
modello: modello,
|
||||||
lavoro: lavoro,
|
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const DeviceCard = ({ registratore }: { registratore: Registratore }) => {
|
||||||
<Card className="@container/card">
|
<Card className="@container/card">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl font-semibold tabular-nums @[250px]/card:text-2xl">
|
<CardTitle className="text-xl font-semibold tabular-nums @[250px]/card:text-2xl">
|
||||||
FORM 100
|
{registratore.modello}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<CardAction className="flex items-center gap-4">
|
<CardAction className="flex items-center gap-4">
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
|
|
@ -102,7 +102,19 @@ const DeviceCard = ({ registratore }: { registratore: Registratore }) => {
|
||||||
<TableHead className="text-right">Fattura</TableHead>
|
<TableHead className="text-right">Fattura</TableHead>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody></TableBody>
|
<TableBody>
|
||||||
|
{registratore.interventi.map((intervento) => (
|
||||||
|
<TableRow key={intervento.id}>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
{new Date(intervento.data).toLocaleDateString("it-IT")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>{intervento.lavoro}</TableCell>
|
||||||
|
<TableCell className="text-right">
|
||||||
|
<Checkbox checked={intervento.fattura} />
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
))}
|
||||||
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,15 @@ import {
|
||||||
} from "@/components/ui/tooltip";
|
} from "@/components/ui/tooltip";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Map as MapIcon } from "lucide-react";
|
import { Map as MapIcon } from "lucide-react";
|
||||||
|
import { Cliente } from "@/generated/prisma";
|
||||||
|
|
||||||
const Map = ({highlight}: {highlight?: string}) => {
|
const Map = ({
|
||||||
|
highlight,
|
||||||
|
clienti,
|
||||||
|
}: {
|
||||||
|
highlight?: string;
|
||||||
|
clienti: Array<Cliente>;
|
||||||
|
}) => {
|
||||||
const positions = [
|
const positions = [
|
||||||
{
|
{
|
||||||
name: "Autogeneral",
|
name: "Autogeneral",
|
||||||
|
|
@ -38,9 +45,6 @@ const Map = ({highlight}: {highlight?: string}) => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
console.log(highlight);
|
|
||||||
console.log(positions.find((client) => client.name == highlight));
|
|
||||||
|
|
||||||
const customMarker = new Icon({
|
const customMarker = new Icon({
|
||||||
iconUrl: "marker-icon-red.png",
|
iconUrl: "marker-icon-red.png",
|
||||||
iconAnchor: [10, 20],
|
iconAnchor: [10, 20],
|
||||||
|
|
@ -49,7 +53,11 @@ const Map = ({highlight}: {highlight?: string}) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MapContainer
|
<MapContainer
|
||||||
center={highlight ? positions.find((client) => client.name == highlight)?.position : [45.54157745559809, 10.211896906975962]}
|
center={
|
||||||
|
highlight
|
||||||
|
? positions.find((client) => client.name == highlight)?.position
|
||||||
|
: [45.54157745559809, 10.211896906975962]
|
||||||
|
}
|
||||||
zoom={13}
|
zoom={13}
|
||||||
scrollWheelZoom={true}
|
scrollWheelZoom={true}
|
||||||
className="m-0 p-0 h-[99%] w-[99%] mx-[0.5%] my-[0.5%] rounded-md z-0"
|
className="m-0 p-0 h-[99%] w-[99%] mx-[0.5%] my-[0.5%] rounded-md z-0"
|
||||||
|
|
@ -58,9 +66,51 @@ const Map = ({highlight}: {highlight?: string}) => {
|
||||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
url={`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`}
|
url={`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`}
|
||||||
/>
|
/>
|
||||||
{ highlight == null ? positions.map((client) => (
|
{highlight == null ? (
|
||||||
|
clienti ? (
|
||||||
|
clienti.map((client) => (
|
||||||
|
<Marker
|
||||||
|
position={[client.lat, client.lon]}
|
||||||
|
draggable={false}
|
||||||
|
animate={false}
|
||||||
|
icon={customMarker}
|
||||||
|
>
|
||||||
|
<Popup className="">
|
||||||
|
<div className="flex flex-row gap-5">
|
||||||
|
<div>
|
||||||
|
<span className="block text-sm font-bold">
|
||||||
|
{client.ragione_sociale}
|
||||||
|
</span>
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<span className="text-xs font-semibold">P.IVA</span>
|
||||||
|
<span className="text-xs">{client.partita_iva}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<a href={client.sede_url} target="blank">
|
||||||
|
<Button variant="outline">
|
||||||
|
<MapIcon className="size-4" />
|
||||||
|
</Button>
|
||||||
|
</a>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>Resetta ricerca</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
</Popup>
|
||||||
|
</Marker>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)
|
||||||
|
) : (
|
||||||
<Marker
|
<Marker
|
||||||
position={client.position}
|
position={
|
||||||
|
positions.find((client) => client.name == highlight)?.position
|
||||||
|
}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
animate={false}
|
animate={false}
|
||||||
icon={customMarker}
|
icon={customMarker}
|
||||||
|
|
@ -68,7 +118,9 @@ const Map = ({highlight}: {highlight?: string}) => {
|
||||||
<Popup className="">
|
<Popup className="">
|
||||||
<div className="flex flex-row gap-5">
|
<div className="flex flex-row gap-5">
|
||||||
<div>
|
<div>
|
||||||
<span className="block text-sm font-bold">{client.name}</span>
|
<span className="block text-sm font-bold">
|
||||||
|
{positions.find((client) => client.name == highlight)?.name}
|
||||||
|
</span>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<span className="text-xs font-semibold">P.IVA</span>
|
<span className="text-xs font-semibold">P.IVA</span>
|
||||||
<span className="text-xs">03417520172</span>
|
<span className="text-xs">03417520172</span>
|
||||||
|
|
@ -77,52 +129,26 @@ const Map = ({highlight}: {highlight?: string}) => {
|
||||||
|
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<a href={client.sede_url} target="blank">
|
<a
|
||||||
<Button variant="outline">
|
href={
|
||||||
<MapIcon className="size-4" />
|
positions.find((client) => client.name == highlight)
|
||||||
</Button>
|
?.sede_url
|
||||||
</a>
|
}
|
||||||
|
target="blank"
|
||||||
|
>
|
||||||
|
<Button variant="outline">
|
||||||
|
<MapIcon className="size-4" />
|
||||||
|
</Button>
|
||||||
|
</a>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Resetta ricerca</p>
|
<p>Resetta ricerca</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</Popup>
|
</Popup>
|
||||||
</Marker>
|
</Marker>
|
||||||
)) :
|
)}
|
||||||
<Marker
|
|
||||||
position={positions.find((client) => client.name == highlight)?.position}
|
|
||||||
draggable={false}
|
|
||||||
animate={false}
|
|
||||||
icon={customMarker}
|
|
||||||
>
|
|
||||||
<Popup className="">
|
|
||||||
<div className="flex flex-row gap-5">
|
|
||||||
<div>
|
|
||||||
<span className="block text-sm font-bold">{positions.find((client) => client.name == highlight)?.name}</span>
|
|
||||||
<div className="flex gap-2">
|
|
||||||
<span className="text-xs font-semibold">P.IVA</span>
|
|
||||||
<span className="text-xs">03417520172</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<a href={positions.find((client) => client.name == highlight)?.sede_url} target="blank">
|
|
||||||
<Button variant="outline">
|
|
||||||
<MapIcon className="size-4" />
|
|
||||||
</Button>
|
|
||||||
</a>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent>
|
|
||||||
<p>Resetta ricerca</p>
|
|
||||||
</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
</Popup>
|
|
||||||
</Marker>
|
|
||||||
}
|
|
||||||
</MapContainer>
|
</MapContainer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -131,7 +131,7 @@ exports.Prisma.InterventoScalarFieldEnum = {
|
||||||
exports.Prisma.RegistratoreScalarFieldEnum = {
|
exports.Prisma.RegistratoreScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
id_cliente: 'id_cliente',
|
id_cliente: 'id_cliente',
|
||||||
seriale: 'seriale',
|
modello: 'modello',
|
||||||
data_acquisto: 'data_acquisto',
|
data_acquisto: 'data_acquisto',
|
||||||
ultima_verifica: 'ultima_verifica',
|
ultima_verifica: 'ultima_verifica',
|
||||||
prossima_verifica: 'prossima_verifica'
|
prossima_verifica: 'prossima_verifica'
|
||||||
|
|
@ -145,7 +145,9 @@ exports.Prisma.ClienteScalarFieldEnum = {
|
||||||
telefono: 'telefono',
|
telefono: 'telefono',
|
||||||
sede: 'sede',
|
sede: 'sede',
|
||||||
sede_url: 'sede_url',
|
sede_url: 'sede_url',
|
||||||
contratto: 'contratto'
|
contratto: 'contratto',
|
||||||
|
lat: 'lat',
|
||||||
|
lon: 'lon'
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.Prisma.SortOrder = {
|
exports.Prisma.SortOrder = {
|
||||||
|
|
@ -162,7 +164,12 @@ exports.Prisma.NullsOrder = {
|
||||||
first: 'first',
|
first: 'first',
|
||||||
last: 'last'
|
last: 'last'
|
||||||
};
|
};
|
||||||
|
exports.Modello = exports.$Enums.Modello = {
|
||||||
|
FORM100: 'FORM100',
|
||||||
|
FORM200: 'FORM200',
|
||||||
|
FORM200PLUS: 'FORM200PLUS',
|
||||||
|
FORM500: 'FORM500'
|
||||||
|
};
|
||||||
|
|
||||||
exports.Prisma.ModelName = {
|
exports.Prisma.ModelName = {
|
||||||
Intervento: 'Intervento',
|
Intervento: 'Intervento',
|
||||||
|
|
|
||||||
541
src/generated/prisma/index.d.ts
vendored
541
src/generated/prisma/index.d.ts
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "prisma-client-a0a80ba0555f8568703a32f3b3a8d9358801f7fa1dcdf09b6f9e9540596b839b",
|
"name": "prisma-client-58455549b989c60e3bedecbaad5fb747da20ec4980d09c51c40211ff854da52b",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"browser": "default.js",
|
"browser": "default.js",
|
||||||
|
|
|
||||||
BIN
src/generated/prisma/query_engine-windows.dll.node.tmp12336
Normal file
BIN
src/generated/prisma/query_engine-windows.dll.node.tmp12336
Normal file
Binary file not shown.
BIN
src/generated/prisma/query_engine-windows.dll.node.tmp22464
Normal file
BIN
src/generated/prisma/query_engine-windows.dll.node.tmp22464
Normal file
Binary file not shown.
BIN
src/generated/prisma/query_engine-windows.dll.node.tmp3292
Normal file
BIN
src/generated/prisma/query_engine-windows.dll.node.tmp3292
Normal file
Binary file not shown.
|
|
@ -8,9 +8,16 @@ datasource db {
|
||||||
url = env("DATABASE_URL")
|
url = env("DATABASE_URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum Modello {
|
||||||
|
FORM100
|
||||||
|
FORM200
|
||||||
|
FORM200PLUS
|
||||||
|
FORM500
|
||||||
|
}
|
||||||
|
|
||||||
model Intervento {
|
model Intervento {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
id_registratore Int
|
id_registratore String
|
||||||
data DateTime @db.Date
|
data DateTime @db.Date
|
||||||
lavoro String @db.Text
|
lavoro String @db.Text
|
||||||
fattura Boolean @db.Boolean
|
fattura Boolean @db.Boolean
|
||||||
|
|
@ -18,9 +25,9 @@ model Intervento {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Registratore {
|
model Registratore {
|
||||||
id Int @id @default(autoincrement())
|
id String @id
|
||||||
id_cliente Int
|
id_cliente Int
|
||||||
seriale String? @db.VarChar(255)
|
modello Modello?
|
||||||
data_acquisto DateTime? @db.Date
|
data_acquisto DateTime? @db.Date
|
||||||
ultima_verifica DateTime? @db.Date
|
ultima_verifica DateTime? @db.Date
|
||||||
prossima_verifica DateTime? @db.Date
|
prossima_verifica DateTime? @db.Date
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ exports.Prisma.InterventoScalarFieldEnum = {
|
||||||
exports.Prisma.RegistratoreScalarFieldEnum = {
|
exports.Prisma.RegistratoreScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
id_cliente: 'id_cliente',
|
id_cliente: 'id_cliente',
|
||||||
seriale: 'seriale',
|
modello: 'modello',
|
||||||
data_acquisto: 'data_acquisto',
|
data_acquisto: 'data_acquisto',
|
||||||
ultima_verifica: 'ultima_verifica',
|
ultima_verifica: 'ultima_verifica',
|
||||||
prossima_verifica: 'prossima_verifica'
|
prossima_verifica: 'prossima_verifica'
|
||||||
|
|
@ -117,7 +117,9 @@ exports.Prisma.ClienteScalarFieldEnum = {
|
||||||
telefono: 'telefono',
|
telefono: 'telefono',
|
||||||
sede: 'sede',
|
sede: 'sede',
|
||||||
sede_url: 'sede_url',
|
sede_url: 'sede_url',
|
||||||
contratto: 'contratto'
|
contratto: 'contratto',
|
||||||
|
lat: 'lat',
|
||||||
|
lon: 'lon'
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.Prisma.SortOrder = {
|
exports.Prisma.SortOrder = {
|
||||||
|
|
@ -134,7 +136,12 @@ exports.Prisma.NullsOrder = {
|
||||||
first: 'first',
|
first: 'first',
|
||||||
last: 'last'
|
last: 'last'
|
||||||
};
|
};
|
||||||
|
exports.Modello = exports.$Enums.Modello = {
|
||||||
|
FORM100: 'FORM100',
|
||||||
|
FORM200: 'FORM200',
|
||||||
|
FORM200PLUS: 'FORM200PLUS',
|
||||||
|
FORM500: 'FORM500'
|
||||||
|
};
|
||||||
|
|
||||||
exports.Prisma.ModelName = {
|
exports.Prisma.ModelName = {
|
||||||
Intervento: 'Intervento',
|
Intervento: 'Intervento',
|
||||||
|
|
@ -188,13 +195,13 @@ const config = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Intervento {\n id Int @id @default(autoincrement())\n id_registratore Int\n data DateTime @db.Date\n lavoro String @db.Text\n fattura Boolean @db.Boolean\n registratore Registratore @relation(fields: [id_registratore], references: [id])\n}\n\nmodel Registratore {\n id Int @id @default(autoincrement())\n id_cliente Int\n seriale String? @db.VarChar(255)\n data_acquisto DateTime? @db.Date\n ultima_verifica DateTime? @db.Date\n prossima_verifica DateTime? @db.Date\n cliente Cliente @relation(fields: [id_cliente], references: [id])\n interventi Intervento[]\n}\n\nmodel Cliente {\n id Int @id @default(autoincrement())\n ragione_sociale String @unique @db.VarChar(255)\n email String @db.VarChar(255)\n partita_iva String @db.VarChar(255)\n telefono String @db.VarChar(255)\n sede String @db.VarChar(255)\n sede_url String @db.VarChar(255)\n contratto String @db.VarChar(255)\n registratori Registratore[]\n}\n",
|
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nenum Modello {\n FORM100\n FORM200\n FORM200PLUS\n FORM500\n}\n\nmodel Intervento {\n id Int @id @default(autoincrement())\n id_registratore String\n data DateTime @db.Date\n lavoro String @db.Text\n fattura Boolean @db.Boolean\n registratore Registratore @relation(fields: [id_registratore], references: [id])\n}\n\nmodel Registratore {\n id String @id\n id_cliente Int\n modello Modello?\n data_acquisto DateTime? @db.Date\n ultima_verifica DateTime? @db.Date\n prossima_verifica DateTime? @db.Date\n cliente Cliente @relation(fields: [id_cliente], references: [id])\n interventi Intervento[]\n}\n\nmodel Cliente {\n id Int @id @default(autoincrement())\n ragione_sociale String @unique @db.VarChar(255)\n email String @db.VarChar(255)\n partita_iva String @db.VarChar(255)\n telefono String @db.VarChar(255)\n sede String @db.VarChar(255)\n sede_url String @db.VarChar(255)\n contratto String @db.VarChar(255)\n lat Float\n lon Float\n registratori Registratore[]\n}\n",
|
||||||
"inlineSchemaHash": "70d19759fda92cfa8dfe96db3ee01c6cf89b508717f745431bdaf7866ae6512a",
|
"inlineSchemaHash": "3424ce1a172605bbf2b32e4c6ada582172d780cc98a6e12f826a26c0cc5b9555",
|
||||||
"copyEngine": true
|
"copyEngine": true
|
||||||
}
|
}
|
||||||
config.dirname = '/'
|
config.dirname = '/'
|
||||||
|
|
||||||
config.runtimeDataModel = JSON.parse("{\"models\":{\"Intervento\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_registratore\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"lavoro\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fattura\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"registratore\",\"kind\":\"object\",\"type\":\"Registratore\",\"relationName\":\"InterventoToRegistratore\"}],\"dbName\":null},\"Registratore\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_cliente\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"seriale\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data_acquisto\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"ultima_verifica\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"prossima_verifica\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"cliente\",\"kind\":\"object\",\"type\":\"Cliente\",\"relationName\":\"ClienteToRegistratore\"},{\"name\":\"interventi\",\"kind\":\"object\",\"type\":\"Intervento\",\"relationName\":\"InterventoToRegistratore\"}],\"dbName\":null},\"Cliente\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ragione_sociale\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"partita_iva\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"telefono\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sede\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sede_url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contratto\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"registratori\",\"kind\":\"object\",\"type\":\"Registratore\",\"relationName\":\"ClienteToRegistratore\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
|
config.runtimeDataModel = JSON.parse("{\"models\":{\"Intervento\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"id_registratore\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"lavoro\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fattura\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"registratore\",\"kind\":\"object\",\"type\":\"Registratore\",\"relationName\":\"InterventoToRegistratore\"}],\"dbName\":null},\"Registratore\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id_cliente\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"modello\",\"kind\":\"enum\",\"type\":\"Modello\"},{\"name\":\"data_acquisto\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"ultima_verifica\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"prossima_verifica\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"cliente\",\"kind\":\"object\",\"type\":\"Cliente\",\"relationName\":\"ClienteToRegistratore\"},{\"name\":\"interventi\",\"kind\":\"object\",\"type\":\"Intervento\",\"relationName\":\"InterventoToRegistratore\"}],\"dbName\":null},\"Cliente\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ragione_sociale\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"partita_iva\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"telefono\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sede\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sede_url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contratto\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lat\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"lon\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"registratori\",\"kind\":\"object\",\"type\":\"Registratore\",\"relationName\":\"ClienteToRegistratore\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
|
||||||
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
||||||
config.engineWasm = {
|
config.engineWasm = {
|
||||||
getRuntime: async () => require('./query_engine_bg.js'),
|
getRuntime: async () => require('./query_engine_bg.js'),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue