Skip to content

Commit bfdbb15

Browse files
committed
feat: update policy signature requirement and dependencies
- Changed the default value of the isRequiredToSign field in the Policy model to true and updated existing records accordingly. - Removed the Employee Signature Requirement section from the UpdatePolicyOverview component. - Added new dependencies including @vitejs/plugin-react, jsdom, vite-tsconfig-paths, and vitest in bun.lock. - Updated the scheduler version in bun.lock to 0.26.0.
1 parent 36a7c76 commit bfdbb15

File tree

4 files changed

+13
-26
lines changed

4 files changed

+13
-26
lines changed

apps/app/src/app/(app)/[orgId]/policies/[policyId]/components/UpdatePolicyOverview.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { Calendar } from '@comp/ui/calendar';
99
import { cn } from '@comp/ui/cn';
1010
import { Popover, PopoverContent, PopoverTrigger } from '@comp/ui/popover';
1111
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@comp/ui/select';
12-
import { Switch } from '@comp/ui/switch';
1312
import { Departments, Frequency, Member, type Policy, PolicyStatus, User } from '@db';
1413
import { format } from 'date-fns';
1514
import { CalendarIcon, Loader2 } from 'lucide-react';
@@ -372,25 +371,6 @@ export function UpdatePolicyOverview({
372371
}
373372
/>
374373
</div>
375-
376-
{/* Required to Sign Field */}
377-
<div className="mt-2 flex flex-col gap-2">
378-
<label htmlFor="isRequiredToSign" className="text-sm font-medium">
379-
Employee Signature Requirement
380-
</label>
381-
<div className="mt-4 flex items-center space-x-2">
382-
<Switch
383-
id="isRequiredToSign"
384-
name="isRequiredToSign"
385-
disabled={fieldsDisabled}
386-
defaultChecked={policy.isRequiredToSign}
387-
onCheckedChange={handleFormChange}
388-
/>
389-
<span className="text-sm text-gray-500">
390-
{policy.isRequiredToSign ? 'Required' : 'Not Required'}
391-
</span>
392-
</div>
393-
</div>
394374
</div>
395375

396376
<div className="col-span-1 flex justify-end gap-2 md:col-span-2">

bun.lock

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,17 @@
424424
"devDependencies": {
425425
"@tailwindcss/cli": "^4.1.10",
426426
"@tailwindcss/postcss": "^4.1.10",
427+
"@vitejs/plugin-react": "^4.3.3",
427428
"autoprefixer": "^10.4.21",
429+
"jsdom": "^26.1.0",
428430
"postcss": "^8.5.4",
429431
"react": "^19.1.1",
430432
"react-dom": "^19.1.0",
431433
"tailwindcss": "^4.1.8",
432434
"tsup": "^8.5.0",
433435
"typescript": "^5.8.3",
436+
"vite-tsconfig-paths": "^5.1.4",
437+
"vitest": "^3.2.4",
434438
},
435439
"peerDependencies": {
436440
"react": "^19.1.1",
@@ -4308,7 +4312,7 @@
43084312

43094313
"saxes": ["[email protected]", "", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA=="],
43104314

4311-
"scheduler": ["scheduler@0.26.0", "", {}, "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA=="],
4315+
"scheduler": ["scheduler@0.25.0", "", {}, "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="],
43124316

43134317
"schema-utils": ["[email protected]", "", { "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } }, "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg=="],
43144318

@@ -5130,8 +5134,6 @@
51305134

51315135
"@react-email/components/@react-email/render": ["@react-email/[email protected]", "", { "dependencies": { "html-to-text": "^9.0.5", "prettier": "^3.5.3", "react-promise-suspense": "^0.3.4" }, "peerDependencies": { "react": "^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-RnRehYN3v9gVlNMehHPHhyp2RQo7+pSkHDtXPvg3s0GbzM9SQMW4Qrf8GRNvtpLC4gsI+Wt0VatNRUFqjvevbw=="],
51325136

5133-
"@react-three/fiber/scheduler": ["[email protected]", "", {}, "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="],
5134-
51355137
"@react-three/postprocessing/maath": ["[email protected]", "", { "peerDependencies": { "@types/three": ">=0.144.0", "three": ">=0.144.0" } }, "sha512-dSb2xQuP7vDnaYqfoKzlApeRcR2xtN8/f7WV/TMAkBC8552TwTLtOO0JTcSygkYMjNDPoo6V01jTw/aPi4JrMw=="],
51365138

51375139
"@semantic-release/github/@semantic-release/error": ["@semantic-release/[email protected]", "", {}, "sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ=="],
@@ -5898,14 +5900,14 @@
58985900

58995901
"rc/strip-json-comments": ["[email protected]", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="],
59005902

5903+
"react-dom/scheduler": ["[email protected]", "", {}, "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA=="],
5904+
59015905
"react-dropzone/file-selector": ["[email protected]", "", { "dependencies": { "tslib": "^2.7.0" } }, "sha512-QgXo+mXTe8ljeqUFaX3QVHc5osSItJ/Km+xpocx0aSqWGMSCf6qYs/VnzZgS864Pjn5iceMRFigeAV7AfTlaig=="],
59025906

59035907
"react-email/chalk": ["[email protected]", "", {}, "sha512-1tm8DTaJhPBG3bIkVeZt1iZM9GfSX2lzOeDVZH9R9ffRHpmHvxZ/QhgQH/aDTkswQVt+YHdXAdS/In/30OjCbg=="],
59045908

59055909
"react-promise-suspense/fast-deep-equal": ["[email protected]", "", {}, "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w=="],
59065910

5907-
"react-reconciler/scheduler": ["[email protected]", "", {}, "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="],
5908-
59095911
"read-cache/pify": ["[email protected]", "", {}, "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog=="],
59105912

59115913
"read-pkg/unicorn-magic": ["[email protected]", "", {}, "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ=="],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Update the default value for the isRequiredToSign field to true
2+
ALTER TABLE "Policy" ALTER COLUMN "isRequiredToSign" SET DEFAULT true;
3+
4+
-- Set all existing policies to be required to sign
5+
UPDATE "Policy" SET "isRequiredToSign" = true WHERE "isRequiredToSign" IS FALSE OR "isRequiredToSign" IS NULL;

packages/db/prisma/schema/policy.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ model Policy {
66
content Json[]
77
frequency Frequency?
88
department Departments?
9-
isRequiredToSign Boolean @default(false)
9+
isRequiredToSign Boolean @default(true)
1010
signedBy String[] @default([])
1111
reviewDate DateTime?
1212
isArchived Boolean @default(false)

0 commit comments

Comments
 (0)