Skip to content

Commit dd27d1f

Browse files
Merge pull request #693 from appwrite/feat-appwrite-dpa
feat: appwrite dpa
2 parents 8be0a66 + bca4ee1 commit dd27d1f

File tree

6 files changed

+55
-1
lines changed

6 files changed

+55
-1
lines changed

src/lib/actions/analytics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export function isTrackingAllowed() {
139139
}
140140

141141
export enum Submit {
142+
DownloadDPA = 'submit_download_dpa',
142143
Error = 'submit_error',
143144
AccountCreate = 'submit_account_create',
144145
AccountLogin = 'submit_account_login',

src/lib/elements/forms/button.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060

6161
{#if href}
6262
<a
63+
on:click
6364
on:click={track}
6465
{href}
6566
target={external ? '_blank' : ''}

src/routes/console/organization-[organization]/settings/+page.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import { invalidate } from '$app/navigation';
99
import { Dependencies } from '$lib/constants';
1010
import { onMount } from 'svelte';
11-
import Delete from './deleteOrganization.svelte';
11+
import Delete from './deleteOrganizationModal.svelte';
12+
import DownloadDPA from './downloadDPA.svelte';
1213
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
1314
1415
export let data;
@@ -63,6 +64,8 @@
6364
</CardGrid>
6465
</Form>
6566

67+
<DownloadDPA />
68+
6669
<CardGrid danger>
6770
<div>
6871
<Heading tag="h6" size="7">Delete organization</Heading>
File renamed without changes.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<script lang="ts">
2+
import { Box, CardGrid, Heading } from '$lib/components';
3+
import { Button } from '$lib/elements/forms';
4+
import { sdk } from '$lib/stores/sdk';
5+
import { Submit, trackEvent } from '$lib/actions/analytics';
6+
7+
async function downloadPdf() {
8+
trackEvent(Submit.DownloadDPA);
9+
const today = new Date().toISOString();
10+
const prefs = await sdk.forConsole.account.getPrefs();
11+
const newPrefs = { ...prefs, DPA: today };
12+
sdk.forConsole.account.updatePrefs(newPrefs);
13+
}
14+
</script>
15+
16+
<CardGrid>
17+
<div>
18+
<Heading tag="h6" size="7">Download DPA document</Heading>
19+
</div>
20+
<p class="text">
21+
After downloading, have the DPA signed by your organization's compliance authority, such as
22+
your CEO or Compliance Manager, and submit it to <a
23+
class="link"
24+
25+
>.
26+
</p>
27+
<svelte:fragment slot="aside">
28+
<Box>
29+
<h6>
30+
<b>Data Processing Agreement (DPA) document</b>
31+
</h6>
32+
<p class="text u-margin-block-start-8">
33+
The DPA is a legal document that describes the roles and responsibilities of
34+
Appwrite and the organization when personal data is processed. Learn more about the
35+
DPA.
36+
</p>
37+
<Button
38+
secondary
39+
external
40+
class="u-margin-block-start-16"
41+
on:click={downloadPdf}
42+
href="/Appwrite_DPA.pdf"
43+
event="download_dpa">
44+
<span class="icon-download" aria-hidden="true" />
45+
<span class="text">Download</span>
46+
</Button>
47+
</Box>
48+
</svelte:fragment>
49+
</CardGrid>

static/Appwrite_DPA.pdf

648 KB
Binary file not shown.

0 commit comments

Comments
 (0)