+ {LEGAL.appName} · Last updated {LEGAL.updated} +
++ {title} +
+{summary}
+ +From ef06bed081d7b468ea6b9b828b65c9ad0d9b1947 Mon Sep 17 00:00:00 2001 From: Ichsan Kurniawan <43689091+ichsankurnia@users.noreply.github.com> Date: Thu, 19 Nov 2026 10:39:26 +0700 Subject: [PATCH] Add privacy policy and terms pages Replace placeholder pages with detailed legal documents covering data handling, Google Calendar use, user rights, and service terms. Add a shared legal page layout and metadata, plus Google site verification. --- app/layout.tsx | 1 + app/privacy-policy/page.tsx | 305 ++++++++++++++++++++++++++++--- app/terms/page.tsx | 206 ++++++++++++++++++--- components/legal/LegalLayout.tsx | 184 +++++++++++++++++++ lib/legal.ts | 10 + 5 files changed, 664 insertions(+), 42 deletions(-) create mode 100644 components/legal/LegalLayout.tsx create mode 100644 lib/legal.ts 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+ {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.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:
++ 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: +
++ 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: ( ++ 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: +
++ 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:
+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: ( +You can ask us to:
++ 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 ( - <> -+ 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:
+Features available to you depend on the role your administrator gives you.
+ > + ), + }, + { + id: 'accounts', + title: 'Accounts', + body: ( +You agree not to:
+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 ( - <> -+ {LEGAL.appName} · Last updated {LEGAL.updated} +
+{summary}
+ +| + {h} + | + ))} +
|---|
| + {c} + | + ))} +