-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into larger-invoice-success-text
- Loading branch information
Showing
54 changed files
with
6,937 additions
and
5,140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
22.6.0 | ||
22.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import ts from "typescript-eslint"; | ||
import server from "@tietokilta/eslint-config/server"; | ||
|
||
export default ts.config(...server, { | ||
rules: { | ||
"unicorn/prefer-node-protocol": "off", | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import type { CollectionConfig, FieldHook } from "payload/types"; | ||
import type { AwardedHonor } from "@tietokilta/cms-types/payload"; | ||
import { signedIn } from "../../access/signed-in"; | ||
import { guildYearField } from "../../fields/guild-year"; | ||
|
||
const formatDisplayTitle: FieldHook<AwardedHonor> = ({ | ||
data: awardedHonor, | ||
}) => { | ||
if (!awardedHonor?.name) { | ||
return "Untitled member"; | ||
} | ||
|
||
if (!awardedHonor.guildYear) { | ||
return awardedHonor.name; | ||
} | ||
|
||
return `${awardedHonor.name}, ${awardedHonor.guildYear}`; | ||
}; | ||
|
||
export const AwardedHonors = { | ||
slug: "awarded-honors", | ||
defaultSort: "-guildYear", | ||
admin: { | ||
useAsTitle: "displayTitle", | ||
defaultColumns: ["description", "guildYear"], | ||
}, | ||
access: { | ||
read: () => true, | ||
create: signedIn, | ||
update: signedIn, | ||
delete: signedIn, | ||
}, | ||
fields: [ | ||
{ | ||
name: "displayTitle", | ||
type: "text", | ||
admin: { | ||
hidden: true, | ||
}, | ||
hooks: { | ||
beforeChange: [formatDisplayTitle], | ||
}, | ||
}, | ||
guildYearField({ | ||
name: "guildYear", | ||
required: true, | ||
}), | ||
{ | ||
name: "name", | ||
type: "text", | ||
required: true, | ||
}, | ||
{ | ||
name: "description", | ||
type: "textarea", | ||
required: false, | ||
localized: true, | ||
}, | ||
], | ||
} as const satisfies CollectionConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import type { CollectionConfig } from "payload/types"; | ||
import { signedIn } from "../../access/signed-in"; | ||
|
||
export const Honors = { | ||
slug: "honors", | ||
defaultSort: "-name", | ||
admin: { | ||
useAsTitle: "name", | ||
defaultColumns: ["name", "awardedHonors"], | ||
}, | ||
access: { | ||
read: () => true, | ||
create: signedIn, | ||
update: signedIn, | ||
delete: signedIn, | ||
}, | ||
fields: [ | ||
{ | ||
name: "name", | ||
type: "text", | ||
required: true, | ||
localized: true, | ||
}, | ||
{ | ||
name: "awardedHonors", | ||
type: "array", | ||
required: true, | ||
minRows: 1, | ||
fields: [ | ||
{ | ||
name: "awardedHonor", | ||
type: "relationship", | ||
relationTo: "awarded-honors", | ||
}, | ||
], | ||
}, | ||
], | ||
} as const satisfies CollectionConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.