Add level position to people
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -79,6 +79,7 @@ function NewPeopleViewContent() {
|
||||
primaryEmailAddress: "",
|
||||
additionalEmailAddresses: [] as string[],
|
||||
kind: "EMPLOYEE" as "EMPLOYEE" | "CONTRACTOR" | "SERVICE_ACCOUNT",
|
||||
position: "",
|
||||
contractStartDate: "",
|
||||
contractEndDate: "",
|
||||
});
|
||||
@@ -133,6 +134,7 @@ function NewPeopleViewContent() {
|
||||
primaryEmailAddress: formData.primaryEmailAddress,
|
||||
additionalEmailAddresses: formData.additionalEmailAddresses,
|
||||
kind: formData.kind,
|
||||
position: formData.position,
|
||||
contractStartDate: formData.contractStartDate ? new Date(formData.contractStartDate).toISOString() : null,
|
||||
contractEndDate: formData.contractEndDate ? new Date(formData.contractEndDate).toISOString() : null,
|
||||
},
|
||||
@@ -294,6 +296,13 @@ function NewPeopleViewContent() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<EditableField
|
||||
label="Position"
|
||||
value={formData.position}
|
||||
type="text"
|
||||
onChange={(value) => handleFieldChange("position", value)}
|
||||
/>
|
||||
|
||||
<EditableField
|
||||
label="Contract Start Date"
|
||||
value={formData.contractStartDate}
|
||||
|
||||
@@ -35,6 +35,7 @@ const peopleViewQuery = graphql`
|
||||
primaryEmailAddress
|
||||
additionalEmailAddresses
|
||||
kind
|
||||
position
|
||||
contractStartDate
|
||||
contractEndDate
|
||||
createdAt
|
||||
@@ -53,6 +54,7 @@ const updatePeopleMutation = graphql`
|
||||
primaryEmailAddress
|
||||
additionalEmailAddresses
|
||||
kind
|
||||
position
|
||||
contractStartDate
|
||||
contractEndDate
|
||||
updatedAt
|
||||
@@ -104,6 +106,7 @@ function PeopleViewContent({
|
||||
primaryEmailAddress: data.node.primaryEmailAddress || "",
|
||||
additionalEmailAddresses: data.node.additionalEmailAddresses || [],
|
||||
kind: data.node.kind,
|
||||
position: data.node.position || "",
|
||||
contractStartDate: data.node.contractStartDate
|
||||
? new Date(data.node.contractStartDate).toISOString().split('T')[0]
|
||||
: "",
|
||||
@@ -119,6 +122,7 @@ function PeopleViewContent({
|
||||
const handleSave = useCallback(() => {
|
||||
const formattedData = {
|
||||
...formData,
|
||||
position: formData.position,
|
||||
contractStartDate: formData.contractStartDate
|
||||
? new Date(formData.contractStartDate).toISOString()
|
||||
: null,
|
||||
@@ -184,6 +188,7 @@ function PeopleViewContent({
|
||||
primaryEmailAddress: data.node.primaryEmailAddress || "",
|
||||
additionalEmailAddresses: data.node.additionalEmailAddresses || [],
|
||||
kind: data.node.kind,
|
||||
position: data.node.position || "",
|
||||
contractStartDate: data.node.contractStartDate
|
||||
? new Date(data.node.contractStartDate).toISOString().split('T')[0]
|
||||
: "",
|
||||
@@ -289,6 +294,12 @@ function PeopleViewContent({
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
<EditableField
|
||||
label="Position"
|
||||
value={formData.position}
|
||||
type="text"
|
||||
onChange={(value) => handleFieldChange("position", value)}
|
||||
/>
|
||||
<EditableField
|
||||
label="Contract Start Date"
|
||||
value={formData.contractStartDate || ""}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<ca6b9dbed6835dd4a9705fe3a90c4b19>>
|
||||
* @generated SignedSource<<b40eaab1027be24a4646edc68e88ad55>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -17,6 +17,7 @@ export type CreatePeopleInput = {
|
||||
fullName: string;
|
||||
kind: PeopleKind;
|
||||
organizationId: string;
|
||||
position?: string | null | undefined;
|
||||
primaryEmailAddress: string;
|
||||
};
|
||||
export type NewPeopleViewCreatePeopleMutation$variables = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<891422de01f5f1b88dc80d294c116c24>>
|
||||
* @generated SignedSource<<37efdd3db937745faa9302820895d0d6>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -22,6 +22,7 @@ export type PeopleViewQuery$data = {
|
||||
readonly fullName?: string;
|
||||
readonly id?: string;
|
||||
readonly kind?: PeopleKind;
|
||||
readonly position?: string | null | undefined;
|
||||
readonly primaryEmailAddress?: string;
|
||||
readonly updatedAt?: string;
|
||||
};
|
||||
@@ -85,24 +86,31 @@ v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractStartDate",
|
||||
"name": "position",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractEndDate",
|
||||
"name": "contractStartDate",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"name": "contractEndDate",
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
@@ -135,7 +143,8 @@ return {
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/)
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/)
|
||||
],
|
||||
"type": "People",
|
||||
"abstractKey": null
|
||||
@@ -179,7 +188,8 @@ return {
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/)
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/)
|
||||
],
|
||||
"type": "People",
|
||||
"abstractKey": null
|
||||
@@ -190,16 +200,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "1a6ca0fa62d60fd18c26a5e3c868f41f",
|
||||
"cacheID": "1ded40b8c43eb2a616f68f73e57d8e9f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "PeopleViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query PeopleViewQuery(\n $peopleId: ID!\n) {\n node(id: $peopleId) {\n __typename\n ... on People {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n contractStartDate\n contractEndDate\n createdAt\n updatedAt\n }\n id\n }\n}\n"
|
||||
"text": "query PeopleViewQuery(\n $peopleId: ID!\n) {\n node(id: $peopleId) {\n __typename\n ... on People {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n position\n contractStartDate\n contractEndDate\n createdAt\n updatedAt\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "473792157216aa14cc6e4e3e0393090b";
|
||||
(node as any).hash = "406c23468d2624429d4174a37ff4abc1";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<86a82de5c4344cc14a120155388e4a6f>>
|
||||
* @generated SignedSource<<ca7c481401202c2276b4212dfffd54d4>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -17,6 +17,7 @@ export type UpdatePeopleInput = {
|
||||
fullName?: string | null | undefined;
|
||||
id: string;
|
||||
kind?: PeopleKind | null | undefined;
|
||||
position?: string | null | undefined;
|
||||
primaryEmailAddress?: string | null | undefined;
|
||||
};
|
||||
export type PeopleViewUpdatePeopleMutation$variables = {
|
||||
@@ -31,6 +32,7 @@ export type PeopleViewUpdatePeopleMutation$data = {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
readonly kind: PeopleKind;
|
||||
readonly position: string | null | undefined;
|
||||
readonly primaryEmailAddress: string;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
@@ -107,6 +109,13 @@ v1 = [
|
||||
"name": "kind",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "position",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -153,16 +162,16 @@ return {
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "398ebbc7659400cbc5d0a750ee7e66b5",
|
||||
"cacheID": "d3bc10093e65e1a612f22687ee2fffed",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "PeopleViewUpdatePeopleMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation PeopleViewUpdatePeopleMutation(\n $input: UpdatePeopleInput!\n) {\n updatePeople(input: $input) {\n people {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n contractStartDate\n contractEndDate\n updatedAt\n }\n }\n}\n"
|
||||
"text": "mutation PeopleViewUpdatePeopleMutation(\n $input: UpdatePeopleInput!\n) {\n updatePeople(input: $input) {\n people {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n position\n contractStartDate\n contractEndDate\n updatedAt\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "686c8546329ae29bd2880b0b1da9f20c";
|
||||
(node as any).hash = "af9cd62a7e73738d72e3ab9ad5ecdc10";
|
||||
|
||||
export default node;
|
||||
|
||||
Reference in New Issue
Block a user