@tietokilta/ilmomasiina-client 2.0.0-alpha42 → 2.0.0-alpha43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,7 +12,7 @@ export declare function countOverflowSignups(quotas: QuotaWithSignupCount[], ope
|
|
|
12
12
|
queueCount: number;
|
|
13
13
|
};
|
|
14
14
|
/** Expands the quota type from {Admin,User}EventSchema, makes quota properties nullable and adds references to quota. */
|
|
15
|
-
export type QuotaSignups<Ev extends AnyEventSchema = AnyEventSchema> = Omit<Ev["quotas"][number], "id" | "title" | "size"> & {
|
|
15
|
+
export type QuotaSignups<Ev extends AnyEventSchema = AnyEventSchema> = Omit<Ev["quotas"][number], "id" | "title" | "size" | "signups"> & {
|
|
16
16
|
type: SignupStatus;
|
|
17
17
|
id: QuotaID | null;
|
|
18
18
|
title: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signupUtils.d.ts","sourceRoot":"","sources":["../../src/utils/signupUtils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,OAAO,EACP,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAEpE,4FAA4F;AAC5F,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,cAAc,GAAG,cAAc,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG;IAClH,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,cAAc,EAAE,KAAK,EAAE,EAAE,GAAG,eAAe,CAAC,EAAE,CAAC,EAAE,CAQ5F;AA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,IAAI,EAAE,YAAY,CAAC;IACnB,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC,EAAE,CAAC,EAAE,CAAC;CAChC,CAAC;AAEF,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,EAAE,CAyDvE;AAED,qCAAqC;AACrC,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,UAEpE"}
|
|
@@ -32,7 +32,7 @@ function getSignupsByQuota(event) {
|
|
|
32
32
|
// If the event does not have signups, only show quotas that somehow still have signups within.
|
|
33
33
|
.filter((quota) => !signupsDisabled || quota.signupCount > 0)
|
|
34
34
|
.map((quota) => {
|
|
35
|
-
const quotaSignups = signups.filter((signup) => signup.quota.id === quota.id && signup.status ===
|
|
35
|
+
const quotaSignups = signups.filter((signup) => signup.quota.id === quota.id && signup.status === ilmomasiina_models_1.SignupStatus.IN_QUOTA);
|
|
36
36
|
return {
|
|
37
37
|
...quota,
|
|
38
38
|
type: ilmomasiina_models_1.SignupStatus.IN_QUOTA,
|
|
@@ -43,7 +43,7 @@ function getSignupsByQuota(event) {
|
|
|
43
43
|
}),
|
|
44
44
|
];
|
|
45
45
|
const { openQuotaCount, queueCount } = countOverflowSignups(event.quotas, event.openQuotaSize);
|
|
46
|
-
const openSignups = signups.filter((signup) => signup.status ===
|
|
46
|
+
const openSignups = signups.filter((signup) => signup.status === ilmomasiina_models_1.SignupStatus.IN_OPEN_QUOTA);
|
|
47
47
|
// Open quota is shown if the event has one, or if signups have been assigned there nevertheless.
|
|
48
48
|
const openQuota = openSignups.length > 0 || (!signupsDisabled && event.openQuotaSize > 0)
|
|
49
49
|
? [
|
|
@@ -57,7 +57,7 @@ function getSignupsByQuota(event) {
|
|
|
57
57
|
},
|
|
58
58
|
]
|
|
59
59
|
: [];
|
|
60
|
-
const queueSignups = signups.filter((signup) => signup.status ===
|
|
60
|
+
const queueSignups = signups.filter((signup) => signup.status === ilmomasiina_models_1.SignupStatus.IN_QUEUE);
|
|
61
61
|
// Queue is shown if signups have been assigned there.
|
|
62
62
|
const queue = queueSignups.length > 0
|
|
63
63
|
? [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tietokilta/ilmomasiina-client",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-alpha43",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Tietokilta/ilmomasiina.git"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash-es": "^4.17.21",
|
|
24
|
-
"@tietokilta/ilmomasiina-models": "2.0.0-
|
|
24
|
+
"@tietokilta/ilmomasiina-models": "2.0.0-alpha43"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^17 || ^18"
|