diff --git a/app/layout.tsx b/app/layout.tsx index b0e50f2..a34d039 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -103,6 +103,7 @@ export default async function RootLayout({ return ( + diff --git a/app/privacy-policy/page.tsx b/app/privacy-policy/page.tsx index dcf7b64..152d078 100644 --- a/app/privacy-policy/page.tsx +++ b/app/privacy-policy/page.tsx @@ -1,26 +1,289 @@ -'use client' +import type { Metadata } from 'next'; -import { FC } from 'react'; -import { Button } from '@/components/ui/button'; -import { useRouter } from 'next/navigation'; +import { A, DataTable, LegalLayout, LegalSection, UL } from '@/components/legal/LegalLayout'; +import { LEGAL } from '@/lib/legal'; -type Props = {}; +export const metadata: Metadata = { + title: `Privacy Policy | ${LEGAL.shortName}`, + description: `How ${LEGAL.appName} collects, uses, stores and protects personal data, including data from Google Calendar.`, +}; -const PrivacyPolicyPage: FC = ({ }) => { - const router = useRouter() +const sections: LegalSection[] = [ + { + id: 'about', + title: 'Who we are and what this covers', + body: ( + <> +

+ {LEGAL.appName} ({LEGAL.shortName}) is a workplace web application at{' '} + {LEGAL.siteUrl}. It is operated by {LEGAL.operator} and used by employees and + administrators for attendance, task and project assignment, leave and permit requests, and approvals. +

+

+ This policy explains what personal data {LEGAL.shortName} handles, why, who can see it, how long it is kept, + and the choices you have. It applies to the {LEGAL.shortName} website, the installable web app (PWA) and + its integration with Google Calendar. +

+ + ), + }, + { + id: 'data-we-collect', + title: 'Data we collect', + body: ( + <> +

We only collect data needed to run the features you use.

+ +

+ Camera and location are requested through your browser. They are only used when you open an attendance + screen, and you can refuse the permission. Without them, attendance that requires a photo or location + cannot be submitted. +

+ + ), + }, + { + id: 'google-data', + title: 'Google user data and Google Calendar', + body: ( + <> +

+ {LEGAL.shortName} connects to the Google Calendar API to show and manage work schedules and + task due dates on a Google Calendar owned by the organisation. This section describes exactly what is + accessed and how it is used. +

+

+ How access works. Employees sign in to {LEGAL.shortName} with their work email and + password, not with Google. The Calendar connection is made once by an administrator, using an + organisation-managed Google account that authorises {LEGAL.shortName} through Google OAuth 2.0. The resulting + refresh token is kept on our server as a protected configuration value. It is never sent to your browser. + {LEGAL.shortName} does not read the personal calendar, email, contacts or Drive files of employees. +

+

The scopes requested, and why:

+ https://www.googleapis.com/auth/calendar, + 'See, create, edit and delete calendars and their events.', + 'Reads the shared work calendar so schedules appear in the app, and manages that calendar when authorised users publish or change work items.', + ], + [ + https://www.googleapis.com/auth/calendar.events, + 'See, create, edit and delete events on calendars.', + 'Creates, updates and removes events and due dates when a user adds, edits or deletes a schedule or task, and optionally adds a Google Meet link and guest emails.', + ], + ]} + /> +

The Google data involved is limited to:

+
    +
  • Event title, description, location, start and end time, all-day flag and colour.
  • +
  • Guest email addresses on an event, and Google Meet or event links.
  • +
  • The creator email and created or updated timestamps of an event.
  • +
+

+ Use and storage. Calendar data is requested from Google when a page needs it and is + displayed to authorised users. {LEGAL.shortName} does not build a separate copy of calendar content for any + other purpose. Items that users create inside {LEGAL.shortName} are saved in our own database as well as in + the calendar. +

+

+ Limited Use. {LEGAL.shortName}'s use and transfer of information received from Google + APIs to any other app adheres to the{' '} + + Google API Services User Data Policy + + , including the Limited Use requirements. In particular: +

+
    +
  • We use Google data only to provide and improve the user-facing calendar and task features described here.
  • +
  • We do not sell Google data and do not transfer it to third parties, except where needed to provide these features, to follow the law, or to protect the security of the service.
  • +
  • We do not use Google data for advertising, including retargeting or interest-based ads.
  • +
  • We do not use Google data to develop, improve or train generalised AI or machine learning models.
  • +
  • Our staff do not read Google data unless an administrator gives permission for a specific support case, it is needed for security or abuse investigation, or the law requires it.
  • +
+

+ Revoking access. The administrator of the connected Google account can remove{' '} + {LEGAL.shortName} at any time at{' '} + myaccount.google.com/permissions. After that, the + calendar features stop working and Google data is no longer fetched. To ask us to delete items created by + the integration, contact us using the details in section 11. +

+ + ), + }, + { + id: 'how-we-use', + title: 'How we use data', + body: ( +
    +
  • Authenticate you and enforce role-based access.
  • +
  • Record, display and report attendance, leave, permits and approvals.
  • +
  • Assign, schedule and track tasks and projects, including syncing them with Google Calendar.
  • +
  • Send notifications you have enabled.
  • +
  • Protect the service, detect misuse such as falsified location or photos, and keep an audit trail.
  • +
  • Fix bugs and keep the application working.
  • +
+ ), + }, + { + id: 'sharing', + title: 'Who can see your data and who we share it with', + body: ( + <> +

+ Inside your organisation. Your managers, HR and administrators can see attendance, leave and + task data that their role permits. Colleagues see only what the features they use expose, such as shared + calendar entries. +

+

+ Service providers. We rely on a small set of providers to run the service: +

+
    +
  • Google for the Calendar API (section 3) and Firebase Cloud Messaging for push notifications.
  • +
  • Our hosting provider for the server and database that run {LEGAL.shortName}.
  • +
+

+ We do not sell personal data and we do not share it for advertising. We may disclose data when the law or a + valid legal request requires it. +

+ + ), + }, + { + id: 'cookies', + title: 'Cookies and local storage', + body: ( + <> +

{LEGAL.shortName} uses only what it needs to work:

+
    +
  • A secure session cookie that keeps you signed in.
  • +
  • Local storage for your theme choice (light, dark or system).
  • +
  • A service worker and cache so the installed web app can load and show an offline page.
  • +
+

We do not use advertising or cross-site tracking cookies.

+ + ), + }, + { + id: 'retention', + title: 'How long we keep data', + body: ( + <> +

+ Attendance, leave and audit records are kept while your account is active and for as long as your organisation + needs them for payroll, labour and audit obligations. After that they are deleted or anonymised. +

+

+ When an account is deactivated, access ends right away. Data tied to it is removed or anonymised on request, + unless a record must be kept by law or for an open dispute. Push tokens are removed when you sign out or + revoke notification permission. Server logs are kept only as long as needed for security and debugging. +

+ + ), + }, + { + id: 'security', + title: 'How we protect data', + body: ( +
    +
  • Traffic between your device and {LEGAL.shortName} is encrypted with HTTPS.
  • +
  • Role-based access control limits each user to the data their job needs.
  • +
  • Google OAuth tokens and API credentials are held on the server as protected configuration, not in the browser or the source code shared with users.
  • +
  • Changes to important records are written to an audit trail.
  • +
+ ), + }, + { + id: 'your-rights', + title: 'Your rights and choices', + body: ( + <> +

You can ask us to:

+
    +
  • Give you a copy of the personal data we hold about you.
  • +
  • Correct data that is wrong or out of date.
  • +
  • Delete your data, where we are not required to keep it.
  • +
  • Stop optional processing, for example by turning off notifications in your browser settings.
  • +
+

+ Some changes, such as editing a submitted attendance record, may need approval from your administrator + because the organisation relies on it as a record. Where Indonesian data protection law (Law No. 27 of 2022 + on Personal Data Protection) applies, you hold the rights it provides. +

+ + ), + }, + { + id: 'children', + title: 'Children', + body: ( +

+ {LEGAL.shortName} is a workplace tool for employees and is not directed to children under 17. We do not knowingly + collect data from children. If you believe a child's data was submitted, contact us and we will delete it. +

+ ), + }, + { + id: 'contact', + title: 'Contact and changes to this policy', + body: ( + <> +

+ For privacy questions, access or deletion requests, or Google data concerns, email{' '} + {LEGAL.contactEmail}. We aim to reply within 14 days. +

+

+ If we change this policy, we will update the date at the top of this page. For material changes, including + any new Google scope, we will tell users inside the app before the change takes effect. See also our{' '} + Terms of Service. +

+ + ), + }, +]; - return ( - <> -
-

Privacy Policy

- Idihh rajin amat sampe buka buka privacy policy segala, kepoo yaa - emang boleh sekepo itu? 😏 -
- -
-
- - ); +export default function PrivacyPolicyPage() { + return ( + + ); } - -export default PrivacyPolicyPage; \ No newline at end of file diff --git a/app/terms/page.tsx b/app/terms/page.tsx index eb5827c..48d3ac6 100644 --- a/app/terms/page.tsx +++ b/app/terms/page.tsx @@ -1,26 +1,190 @@ -'use client' +import type { Metadata } from 'next'; -import { FC } from 'react'; -import { Button } from '@/components/ui/button'; -import { useRouter } from 'next/navigation'; +import { A, LegalLayout, LegalSection, UL } from '@/components/legal/LegalLayout'; +import { LEGAL } from '@/lib/legal'; -type Props = {}; +export const metadata: Metadata = { + title: `Terms of Service | ${LEGAL.shortName}`, + description: `The rules for using ${LEGAL.appName}.`, +}; -const TermsPage: FC = ({ }) => { - const router = useRouter() +const sections: LegalSection[] = [ + { + id: 'acceptance', + title: 'Acceptance of these terms', + body: ( +

+ These terms govern your use of {LEGAL.appName} ({LEGAL.shortName}) at {LEGAL.siteUrl}, + operated by {LEGAL.operator}. By signing in or using the service you agree to them and to our{' '} + Privacy Policy. If you do not agree, do not use the service. +

+ ), + }, + { + id: 'service', + title: 'What the service does', + body: ( + <> +

{LEGAL.shortName} is a workplace application that provides:

+
    +
  • Attendance check-in and check-out with location and photo.
  • +
  • Leave, permit and sick requests with approval workflow and generated documents.
  • +
  • Task, client and project assignment.
  • +
  • Calendar scheduling through an integration with Google Calendar.
  • +
  • Reports, notifications and administration tools for authorised staff.
  • +
+

Features available to you depend on the role your administrator gives you.

+ + ), + }, + { + id: 'accounts', + title: 'Accounts', + body: ( +
    +
  • Accounts are created or approved by your organisation. You must give accurate information.
  • +
  • Keep your password private. You are responsible for activity under your account, so tell us promptly if you suspect misuse.
  • +
  • Do not share your account or sign in as someone else.
  • +
+ ), + }, + { + id: 'acceptable-use', + title: 'Acceptable use', + body: ( + <> +

You agree not to:

+
    +
  • Submit false attendance, for example fake GPS location, photos of someone else, or photos of photos.
  • +
  • Submit leave, permit or sick requests with false reasons or forged attachments or signatures.
  • +
  • Access data or areas of the service your role does not allow, or try to bypass access controls.
  • +
  • Probe, scan, overload or interfere with the service, or introduce malware.
  • +
  • Copy, resell or reverse engineer the service, except where the law allows it.
  • +
  • Use the service to harass others or to store unlawful content.
  • +
+

Your organisation may take disciplinary action under its own policies for misuse of attendance records.

+ + ), + }, + { + id: 'your-content', + title: 'Your data and content', + body: ( + <> +

+ You keep ownership of what you submit, such as requests, attachments and task details. You give {LEGAL.operator}{' '} + permission to process it to run the service for you and your organisation, as described in the Privacy Policy. +

+

+ Attendance, leave and task records are also records of your organisation, which decides how they are used for + HR and payroll purposes. +

+ + ), + }, + { + id: 'google', + title: 'Google Calendar integration', + body: ( + <> +

+ The calendar features use Google APIs through an account connected by an administrator. Use of Google data is + covered by section 3 of the Privacy Policy, which includes our + compliance with the Google API Services User Data Policy and its Limited Use requirements. +

+

+ Your use of Google Calendar and Google Meet is also subject to{' '} + Google's Terms of Service. Calendar features may stop if + Google changes or withdraws its APIs, or if the connected account revokes access. +

+ + ), + }, + { + id: 'permissions', + title: 'Device permissions', + body: ( +

+ Attendance features ask your browser for camera and location access, and notifications ask for permission to + send alerts. You can refuse or withdraw these at any time in your browser or device settings. Features that need a + permission will not work without it. +

+ ), + }, + { + id: 'ip', + title: 'Intellectual property', + body: ( +

+ The {LEGAL.shortName} software, name, logo and design belong to {LEGAL.operator} or its licensors. You receive a + limited, non-exclusive, non-transferable right to use the service for your work while your account is active. +

+ ), + }, + { + id: 'availability', + title: 'Availability and changes', + body: ( +

+ We work to keep {LEGAL.shortName} available, but it may be interrupted for maintenance, updates or events outside our + control. We may change or remove features. We will give notice of significant changes where we reasonably can. +

+ ), + }, + { + id: 'disclaimer', + title: 'Disclaimers and limits of liability', + body: ( + <> +

+ The service is provided "as is" and "as available". To the extent the law allows, we do not + promise it will be uninterrupted or error free, and we are not responsible for decisions made from attendance or + report data without checking it. +

+

+ To the extent the law allows, {LEGAL.operator} is not liable for indirect or consequential loss arising from use of + the service. Nothing in these terms limits liability that cannot be limited by law. +

+ + ), + }, + { + id: 'termination', + title: 'Suspension and termination', + body: ( +

+ Your access ends when your organisation deactivates your account or you stop being part of it. We may suspend an + account that breaks these terms or puts the service or others at risk. You may stop using the service at any time and + can request deletion of your data as described in the Privacy Policy. +

+ ), + }, + { + id: 'law', + title: 'Governing law, changes and contact', + body: ( + <> +

+ These terms are governed by the laws of the Republic of Indonesia. We will first try to settle disputes through + discussion before any formal proceedings. +

+

+ We may update these terms. The date at the top of this page shows the latest version, and continued use after a + change means you accept it. For questions, email{' '} + {LEGAL.contactEmail}. +

+ + ), + }, +]; - return ( - <> -
-

Terms of Service

- Gausah sok rajin, sok sok an baca terms condition segala - emang boleh serajin itu? 😌 -
- -
-
- - ); +export default function TermsPage() { + return ( + + ); } - -export default TermsPage; \ No newline at end of file diff --git a/components/legal/LegalLayout.tsx b/components/legal/LegalLayout.tsx new file mode 100644 index 0000000..8c7147c --- /dev/null +++ b/components/legal/LegalLayout.tsx @@ -0,0 +1,184 @@ +import Link from 'next/link'; +import { ReactNode } from 'react'; + +import Logo from '@/app/(dashboard)/components/Logo'; +import { ToggleTheme } from '@/components/ToggleTheme'; +import { LEGAL } from '@/lib/legal'; + +export type LegalSection = { + id: string; + title: string; + body: ReactNode; +}; + +type Props = { + title: string; + summary: string; + current: 'privacy-policy' | 'terms'; + sections: LegalSection[]; +}; + +const linkClass = + 'text-[#B8391A] dark:text-[#FF8F70] underline underline-offset-4 decoration-1 hover:decoration-2 rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#B8391A] dark:focus-visible:outline-[#FF8F70]'; + +export function LegalLayout({ title, summary, current, sections }: Props) { + const other = + current === 'privacy-policy' + ? { href: '/terms', label: 'Terms of Service' } + : { href: '/privacy-policy', label: 'Privacy Policy' }; + + return ( +
+
+
+ + +
+
+ +
+ + +
+

+ {LEGAL.appName} · Last updated {LEGAL.updated} +

+

+ {title} +

+

{summary}

+ +
+ {sections.map((s, i) => ( +
+

+ {i + 1}. + {s.title} +

+
+ {s.body} +
+
+ ))} +
+ + +
+
+
+ ); +} + +function TocList({ sections }: { sections: LegalSection[] }) { + return ( +
    + {sections.map((s, i) => ( +
  1. + + {i + 1}. + {s.title} + +
  2. + ))} +
+ ); +} + +export function UL({ children }: { children: ReactNode }) { + return
    {children}
; +} + +export function A({ href, children }: { href: string; children: ReactNode }) { + const external = href.startsWith('http'); + return ( + + {children} + + ); +} + +export function DataTable({ head, rows }: { head: string[]; rows: ReactNode[][] }) { + return ( +
+ + + + {head.map((h) => ( + + ))} + + + + {rows.map((r, i) => ( + + {r.map((c, j) => ( + + ))} + + ))} + +
+ {h} +
+ {c} +
+
+ ); +} diff --git a/lib/legal.ts b/lib/legal.ts new file mode 100644 index 0000000..a8e341f --- /dev/null +++ b/lib/legal.ts @@ -0,0 +1,10 @@ +// Single source for facts repeated across the legal pages. +// Update LEGAL_UPDATED when the policy text changes materially. +export const LEGAL = { + appName: 'HIS Attendance Task System (H.A.T.s)', + shortName: 'H.A.T.s', + operator: 'HIS', + siteUrl: 'https://hats.hisnutech.my.id', + contactEmail: 'his.nutech@gmail.com', + updated: '19 November 2026', +} as const;