-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathvoting.ts
43 lines (38 loc) · 1 KB
/
voting.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import type { Assembly } from './assembly';
import type { Link } from './link';
export interface Voting {
date: Date;
title?: string;
description?: string;
nickname: string;
winningCondition?: string;
sourceUrl: string;
id: string;
result: string;
meetingType: string;
participatedAssemblies: Assembly[];
voteOptions: (DefaultVoteOption | CustomVoteOption | string)[];
files: Link[];
}
export interface CustomVoteOption {
label: string;
colorIntensity: number; // 0-1
}
export enum DefaultVotingResult {
Passed = 'ผ่าน',
Failed = 'ไม่ผ่าน'
}
export enum DefaultVoteOption {
Agreed = 'เห็นด้วย',
Disagreed = 'ไม่เห็นด้วย',
Novote = 'งดออกเสียง',
Abstain = 'ไม่ลงคะแนน',
Absent = 'ลา / ขาดลงมติ'
}
export const defaultVoteOptions: string[] = [
DefaultVoteOption.Agreed,
DefaultVoteOption.Disagreed,
DefaultVoteOption.Novote,
DefaultVoteOption.Abstain,
DefaultVoteOption.Absent
];