Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | 1x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x | import {model} from '@feasibleone/blong';
export default model(
() =>
async function partyPersonModel() {
return {
subject: 'party',
object: 'person',
objectTitle: 'Person',
public: true,
nameField: 'person.lastName',
schema: {
properties: {
person: {
properties: {
firstName: {title: 'First Name'},
middleName: {title: 'Middle Name'},
lastName: {title: 'Last Name'},
birthDate: {title: 'Date of Birth'},
gender: {
title: 'Gender',
widget: {
options: [
{value: 'male', label: 'Male'},
{value: 'female', label: 'Female'},
{value: 'other', label: 'Other'},
],
},
},
maritalStatus: {
title: 'Marital Status',
widget: {
options: [
{value: 'single', label: 'Single'},
{value: 'married', label: 'Married'},
{value: 'divorced', label: 'Divorced'},
{value: 'widowed', label: 'Widowed'},
],
},
},
nationality: {title: 'Nationality', filter: true},
occupation: {title: 'Occupation'},
notes: {title: 'Notes'},
// server schema defined
// personId: {},
},
widget: {
columns: ['firstName', 'lastName', 'nationality', 'occupation'],
},
},
/** Contact details card — email, phone, mobile. */
contact: {
properties: {
contactType: {
title: 'Contact Type',
widget: {
options: [
{value: 'email', label: 'Email'},
{value: 'phone', label: 'Phone'},
{value: 'mobile', label: 'Mobile'},
{value: 'fax', label: 'Fax'},
],
},
},
contactValue: {title: 'Contact Value'},
isPrimary: {title: 'Primary'},
},
widget: {
columns: ['contactType', 'contactValue', 'isPrimary'],
},
},
/** Address card — physical addresses. */
address: {
properties: {
addressType: {
title: 'Address Type',
widget: {
options: [
{value: 'home', label: 'Home'},
{value: 'work', label: 'Work'},
{value: 'billing', label: 'Billing'},
{value: 'shipping', label: 'Shipping'},
],
},
},
streetAddress: {title: 'Street Address'},
city: {title: 'City'},
stateProvince: {title: 'State / Province'},
postalCode: {title: 'Postal Code'},
isPrimary: {title: 'Primary'},
// server schema defined
// partyAddressId: {},
// partyResourceId: {},
// countryId: {},
},
widget: {
columns: ['addressType', 'streetAddress', 'city', 'isPrimary'],
},
},
/** Identifier card — official IDs. */
identifier: {
properties: {
identifierType: {
title: 'Identifier Type',
widget: {
options: [
{value: 'passport', label: 'Passport'},
{value: 'nationalId', label: 'National ID'},
{value: 'driversLicense', label: "Driver's License"},
{value: 'ssn', label: 'Social Security No'},
{value: 'taxId', label: 'Tax ID'},
],
},
},
identifierValue: {title: 'Identifier Value'},
issuingAuthority: {title: 'Issuing Authority'},
issuedDate: {title: 'Issue Date'},
expiryDate: {title: 'Expiry Date'},
// server schema defined
// partyIdentifierId: {},
// partyResourceId: {},
},
widget: {
columns: [
'identifierType',
'identifierValue',
'issuingAuthority',
'expiryDate',
],
},
},
/**
* Organization membership card — linked units.
*
* Hierarchy relationships (person → unit) are stored in core.triple
* with predicate \"belongsTo\". This card will be populated by a custom
* adapter handler that traverses core.triple — placeholder for future
* implementation or realm contribution.
*/
},
},
cards: {
browse: {
label: 'Persons',
widgets: ['person'],
},
personal: {
label: 'Personal Info',
className: 'col-12',
widgets: [
'person.firstName',
'person.middleName',
'person.lastName',
'person.birthDate',
'person.gender',
'person.maritalStatus',
'person.nationality',
'person.occupation',
'person.notes',
],
},
contactCard: {
label: 'Contact Details',
widgets: ['contact'],
},
addressCard: {
label: 'Addresses',
widgets: ['address'],
},
identifierCard: {
label: 'Identifiers',
widgets: ['identifier'],
},
/**
* Organization membership tab — placeholder for core.triple-based
* hierarchy queries. Add a card and widget here once a custom
* adapter handler for person→unit membership is implemented.
*/
},
layouts: {
edit: [['personal']],
editThumbIndex: {
orientation: 'left',
items: [
{
id: 'personal',
label: 'Personal Info',
icon: 'pi pi-user',
widgets: ['personal'],
},
{
id: 'contact',
label: 'Contact',
icon: 'pi pi-envelope',
widgets: ['contactCard'],
},
{
id: 'address',
label: 'Addresses',
icon: 'pi pi-map-marker',
widgets: ['addressCard'],
},
{
id: 'identifiers',
label: 'Identifiers',
icon: 'pi pi-id-card',
widgets: ['identifierCard'],
},
/**
* Organization tab — placeholder. Add widgets here once a
* custom adapter handler queries core.triple for person →
* unit → organization membership.
*/
],
},
},
browser: {
icon: 'pi pi-users',
toolbar: [
{
label: 'Create',
icon: 'pi pi-plus',
action: 'component/party.person.new',
permission: 'party.person.add',
},
{
label: 'Edit',
icon: 'pi pi-pencil',
enabled: 'current' as const,
method: 'component/party.person.open',
params: '${current}',
},
{
label: 'Report',
icon: 'pi pi-chart-bar',
action: 'component/party.person.report',
},
{
label: 'Delete',
icon: 'pi pi-trash',
enabled: 'selected' as const,
confirm: 'Delete selected person record?',
method: 'party.person.remove',
params: {personId: '${personId}'},
},
],
},
};
},
);
|