1
0
Fork 0

feat: add qualifications field to profiles

- Add qualifications relationship field to Profiles collection progression
- Update payload-types.ts with new type definitions
This commit is contained in:
Jason Fraley 2026-07-31 20:03:58 -04:00
parent a3e88ef9fa
commit 1882a74066
3 changed files with 49 additions and 4 deletions

View file

@ -21,6 +21,8 @@ import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93
import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
import { default as default_c3ea68702b5e5f8f2f98055e01c43c8d } from '@/components/admin/awards/RibbonDesigner'
import { default as default_2f2033acccb3be245f1a85f7b4271dac } from '@/components/admin/awards/MedalDesigner'
import { default as default_0edde40a6ccd30c893b1227360f69360 } from '@/components/static/TickDurationDescription'
import { default as default_2d468cc5cf0b647ffca3201592c20825 } from '@/components/static/WarningMessage'
import { default as default_7fa52484aec46e988e9cfb5e86c0c759 } from '@/components/admin/narrative-flow/NarrativeFlowEditor'
@ -53,6 +55,8 @@ export const importMap = {
"@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
"@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
"@/components/admin/awards/RibbonDesigner#default": default_c3ea68702b5e5f8f2f98055e01c43c8d,
"@/components/admin/awards/MedalDesigner#default": default_2f2033acccb3be245f1a85f7b4271dac,
"@/components/static/TickDurationDescription#default": default_0edde40a6ccd30c893b1227360f69360,
"@/components/static/WarningMessage#default": default_2d468cc5cf0b647ffca3201592c20825,
"@/components/admin/narrative-flow/NarrativeFlowEditor#default": default_7fa52484aec46e988e9cfb5e86c0c759,

View file

@ -125,6 +125,15 @@ export const Profiles: CollectionConfig = {
appearance: "drawer",
},
},
{
name: "qualifications",
type: "relationship",
relationTo: "qualifications",
hasMany: true,
admin: {
appearance: "drawer",
},
},
{
name: "scoreboard",
type: "group",

View file

@ -1085,6 +1085,7 @@ export interface Profile {
progression?: {
xp?: number | null;
awards?: (number | Award)[] | null;
qualifications?: (number | Qualification)[] | null;
scoreboard?: {
infantryKills?: number | null;
vehicleKills?: number | null;
@ -1121,6 +1122,24 @@ export interface Award {
type?: ('commendation' | 'ribbon' | 'medal') | null;
image?: (number | null) | Media;
experiencePoints?: number | null;
ribbonDesign?:
| {
[k: string]: unknown;
}
| unknown[]
| string
| number
| boolean
| null;
medalDesign?:
| {
[k: string]: unknown;
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
}
@ -1295,7 +1314,7 @@ export interface Mission {
civilianPresence?: ('None' | 'Low' | 'Medium' | 'High') | null;
factionsInvolved?:
| {
factionName: string;
faction: number | Faction;
threatLevel: 'ally' | 'friendly' | 'neutral' | 'hostile';
id?: string | null;
}[]
@ -1306,8 +1325,8 @@ export interface Mission {
serverPort: number;
serverPassword?: string | null;
};
gameSetup: {
missionFile: number | MissionFile;
gameSetup?: {
missionFile?: (number | null) | MissionFile;
/**
* This field is not required only because you may be running a vanilla gamemode. If you have any mods at all in your mission, you MUST include a mod list.
*/
@ -1780,6 +1799,7 @@ export interface ProfilesSelect<T extends boolean = true> {
| {
xp?: T;
awards?: T;
qualifications?: T;
scoreboard?:
| T
| {
@ -1803,6 +1823,8 @@ export interface AwardsSelect<T extends boolean = true> {
type?: T;
image?: T;
experiencePoints?: T;
ribbonDesign?: T;
medalDesign?: T;
updatedAt?: T;
createdAt?: T;
}
@ -1904,7 +1926,7 @@ export interface MissionsSelect<T extends boolean = true> {
factionsInvolved?:
| T
| {
factionName?: T;
faction?: T;
threatLevel?: T;
id?: T;
};
@ -2407,6 +2429,14 @@ export interface GameRule {
* The base currency ("gold standard") used by all factions to pay for goods and services.
*/
mainCurrency: number | Resource;
/**
* Assignment(s) considered unit command. Members and leaders of these assignments get elevated access to draft missions and other restricted content.
*/
commandAssignments?: (number | Assignment)[] | null;
/**
* Assignment(s) considered the intelligence division. Members and leaders of these assignments get elevated access to draft missions and intelligence content.
*/
intelAssignments?: (number | Assignment)[] | null;
updatedAt?: string | null;
createdAt?: string | null;
}
@ -2416,6 +2446,8 @@ export interface GameRule {
*/
export interface GameRulesSelect<T extends boolean = true> {
mainCurrency?: T;
commandAssignments?: T;
intelAssignments?: T;
updatedAt?: T;
createdAt?: T;
globalType?: T;