Remove measure importance
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -65,7 +65,6 @@ const linkedMesuresQuery = graphql`
|
|||||||
name
|
name
|
||||||
description
|
description
|
||||||
category
|
category
|
||||||
importance
|
|
||||||
state
|
state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +87,6 @@ const organizationMesuresQuery = graphql`
|
|||||||
name
|
name
|
||||||
description
|
description
|
||||||
category
|
category
|
||||||
importance
|
|
||||||
state
|
state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -721,24 +719,6 @@ export function Control({
|
|||||||
setIsPolicyMappingDialogOpen(true);
|
setIsPolicyMappingDialogOpen(true);
|
||||||
}, [loadPoliciesData]);
|
}, [loadPoliciesData]);
|
||||||
|
|
||||||
// UI helper functions
|
|
||||||
const formatImportance = (importance: string | undefined): string => {
|
|
||||||
if (!importance) return "Unknown";
|
|
||||||
|
|
||||||
switch (importance) {
|
|
||||||
case "LOW":
|
|
||||||
return "Low";
|
|
||||||
case "MEDIUM":
|
|
||||||
return "Medium";
|
|
||||||
case "HIGH":
|
|
||||||
return "High";
|
|
||||||
case "CRITICAL":
|
|
||||||
return "Critical";
|
|
||||||
default:
|
|
||||||
return importance;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const formatState = (state: string | undefined): string => {
|
const formatState = (state: string | undefined): string => {
|
||||||
if (!state) return "Unknown";
|
if (!state) return "Unknown";
|
||||||
|
|
||||||
@@ -756,23 +736,6 @@ export function Control({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getImportanceColor = (importance: string | undefined): string => {
|
|
||||||
if (!importance) return "bg-secondary-bg text-secondary";
|
|
||||||
|
|
||||||
switch (importance) {
|
|
||||||
case "LOW":
|
|
||||||
return "bg-success-bg text-success";
|
|
||||||
case "MEDIUM":
|
|
||||||
return "bg-info-bg text-info";
|
|
||||||
case "HIGH":
|
|
||||||
return "bg-warning-bg text-warning";
|
|
||||||
case "CRITICAL":
|
|
||||||
return "bg-danger-bg text-danger";
|
|
||||||
default:
|
|
||||||
return "bg-secondary-bg text-secondary";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getStateColor = (state: string | undefined): string => {
|
const getStateColor = (state: string | undefined): string => {
|
||||||
if (!state) return "bg-secondary-bg text-secondary";
|
if (!state) return "bg-secondary-bg text-secondary";
|
||||||
|
|
||||||
@@ -871,9 +834,6 @@ export function Control({
|
|||||||
<thead className="sticky top-0 bg-white">
|
<thead className="sticky top-0 bg-white">
|
||||||
<tr className="border-b text-left text-sm text-secondary bg-invert-bg">
|
<tr className="border-b text-left text-sm text-secondary bg-invert-bg">
|
||||||
<th className="py-3 px-4 font-medium">Name</th>
|
<th className="py-3 px-4 font-medium">Name</th>
|
||||||
<th className="py-3 px-4 font-medium">
|
|
||||||
Importance
|
|
||||||
</th>
|
|
||||||
<th className="py-3 px-4 font-medium">State</th>
|
<th className="py-3 px-4 font-medium">State</th>
|
||||||
<th className="py-3 px-4 font-medium text-right">
|
<th className="py-3 px-4 font-medium text-right">
|
||||||
Actions
|
Actions
|
||||||
@@ -898,15 +858,6 @@ export function Control({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="py-3 px-4">
|
|
||||||
<div
|
|
||||||
className={`px-2 py-0.5 rounded-full text-xs ${getImportanceColor(
|
|
||||||
mesure.importance
|
|
||||||
)} inline-block`}
|
|
||||||
>
|
|
||||||
{formatImportance(mesure.importance)}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="py-3 px-4">
|
<td className="py-3 px-4">
|
||||||
<div
|
<div
|
||||||
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
||||||
@@ -1000,7 +951,6 @@ export function Control({
|
|||||||
<thead>
|
<thead>
|
||||||
<tr className="border-b text-left text-sm text-secondary bg-invert-bg">
|
<tr className="border-b text-left text-sm text-secondary bg-invert-bg">
|
||||||
<th className="py-3 px-4 font-medium">Name</th>
|
<th className="py-3 px-4 font-medium">Name</th>
|
||||||
<th className="py-3 px-4 font-medium">Importance</th>
|
|
||||||
<th className="py-3 px-4 font-medium">State</th>
|
<th className="py-3 px-4 font-medium">State</th>
|
||||||
<th className="py-3 px-4 font-medium text-right">
|
<th className="py-3 px-4 font-medium text-right">
|
||||||
Actions
|
Actions
|
||||||
@@ -1021,15 +971,6 @@ export function Control({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="py-3 px-4">
|
|
||||||
<div
|
|
||||||
className={`px-2 py-0.5 rounded-full text-xs ${getImportanceColor(
|
|
||||||
mesure.importance
|
|
||||||
)} inline-block`}
|
|
||||||
>
|
|
||||||
{formatImportance(mesure.importance)}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="py-3 px-4">
|
<td className="py-3 px-4">
|
||||||
<div
|
<div
|
||||||
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<03360061cfc99eaa1ec9921a815f9fa0>>
|
* @generated SignedSource<<94f5c5a041ae3730b8f4a71ad63530a8>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type ControlLinkedMesuresQuery$variables = {
|
export type ControlLinkedMesuresQuery$variables = {
|
||||||
controlId: string;
|
controlId: string;
|
||||||
@@ -23,7 +22,6 @@ export type ControlLinkedMesuresQuery$data = {
|
|||||||
readonly category: string;
|
readonly category: string;
|
||||||
readonly description: string;
|
readonly description: string;
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly importance: MesureImportance;
|
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
readonly state: MesureState;
|
readonly state: MesureState;
|
||||||
};
|
};
|
||||||
@@ -104,13 +102,6 @@ v4 = [
|
|||||||
"name": "category",
|
"name": "category",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "importance",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -253,7 +244,7 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "19d9240a60b26d765a93e00be9e1e83f",
|
"cacheID": "b29cb1662103fc42abf16fa6b3458a68",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"connection": [
|
"connection": [
|
||||||
@@ -270,11 +261,11 @@ return {
|
|||||||
},
|
},
|
||||||
"name": "ControlLinkedMesuresQuery",
|
"name": "ControlLinkedMesuresQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query ControlLinkedMesuresQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n importance\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
"text": "query ControlLinkedMesuresQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "acb01a862fb268c4b4b557edc3090a0e";
|
(node as any).hash = "e42a48d7b21eaa5c42331377b6a9bc9c";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<345a2b05f66a0bb630eea3c12f549e52>>
|
* @generated SignedSource<<862b2210a9d569a05063cebc805bdd01>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type ControlOrganizationMesuresQuery$variables = {
|
export type ControlOrganizationMesuresQuery$variables = {
|
||||||
organizationId: string;
|
organizationId: string;
|
||||||
@@ -23,7 +22,6 @@ export type ControlOrganizationMesuresQuery$data = {
|
|||||||
readonly category: string;
|
readonly category: string;
|
||||||
readonly description: string;
|
readonly description: string;
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly importance: MesureImportance;
|
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
readonly state: MesureState;
|
readonly state: MesureState;
|
||||||
};
|
};
|
||||||
@@ -104,13 +102,6 @@ v4 = [
|
|||||||
"name": "category",
|
"name": "category",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "importance",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -253,7 +244,7 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "59ceb60db60754876774a3856686b35c",
|
"cacheID": "bb1066800bfa28aaa64a2fd1f12c5924",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"connection": [
|
"connection": [
|
||||||
@@ -270,11 +261,11 @@ return {
|
|||||||
},
|
},
|
||||||
"name": "ControlOrganizationMesuresQuery",
|
"name": "ControlOrganizationMesuresQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query ControlOrganizationMesuresQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n importance\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
"text": "query ControlOrganizationMesuresQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "cc43b07a1a1f5831f5d09fbd13d8805d";
|
(node as any).hash = "5f1d6b11af3d92bec1c4d37ceb12b7c3";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ const editMesureQuery = graphql`
|
|||||||
name
|
name
|
||||||
description
|
description
|
||||||
category
|
category
|
||||||
importance
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,8 +58,7 @@ function EditMesureViewContent({
|
|||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
name: mesure.name ?? "",
|
name: mesure.name ?? "",
|
||||||
description: mesure.description ?? "",
|
description: mesure.description ?? "",
|
||||||
category: mesure.category ?? "",
|
category: mesure.category ?? ""
|
||||||
importance: mesure.importance,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const [commit, isInFlight] =
|
const [commit, isInFlight] =
|
||||||
@@ -91,8 +89,7 @@ function EditMesureViewContent({
|
|||||||
id: mesureId!,
|
id: mesureId!,
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
description: formData.description,
|
description: formData.description,
|
||||||
category: formData.category,
|
category: formData.category
|
||||||
importance: formData.importance,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onCompleted(data, errors) {
|
onCompleted(data, errors) {
|
||||||
@@ -152,52 +149,6 @@ function EditMesureViewContent({
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<Label className="text-sm">Importance</Label>
|
|
||||||
</div>
|
|
||||||
<div className="flex gap-2">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => handleFieldChange("importance", "MANDATORY")}
|
|
||||||
className={cn(
|
|
||||||
"rounded-full cursor-pointer px-4 py-1 text-sm transition-colors",
|
|
||||||
formData.importance === "MANDATORY"
|
|
||||||
? "bg-danger-bg text-danger ring ring-danger-b"
|
|
||||||
: "bg-invert-bg hover:bg-h-invert-bg"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
Mandatory
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => handleFieldChange("importance", "PREFERRED")}
|
|
||||||
className={cn(
|
|
||||||
"rounded-full cursor-pointer px-4 py-1 text-sm transition-colors",
|
|
||||||
formData.importance === "PREFERRED"
|
|
||||||
? "bg-warning-bg text-warning ring ring-warning-b"
|
|
||||||
: "bg-invert-bg hover:bg-h-invert-bg"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
Preferred
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => handleFieldChange("importance", "ADVANCED")}
|
|
||||||
className={cn(
|
|
||||||
"rounded-full cursor-pointer px-4 py-1 text-sm transition-colors",
|
|
||||||
formData.importance === "ADVANCED"
|
|
||||||
? "bg-info-bg text-info ring ring-info-b"
|
|
||||||
: "bg-invert-bg hover:bg-h-invert-bg"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
Advanced
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex justify-end gap-3">
|
<div className="flex justify-end gap-3">
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ const mesureListViewQuery = graphql`
|
|||||||
description
|
description
|
||||||
category
|
category
|
||||||
state
|
state
|
||||||
importance
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
@@ -75,7 +74,6 @@ const importMesureMutation = graphql`
|
|||||||
description
|
description
|
||||||
category
|
category
|
||||||
state
|
state
|
||||||
importance
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
@@ -90,7 +88,6 @@ interface Mesure {
|
|||||||
description?: string;
|
description?: string;
|
||||||
state?: string;
|
state?: string;
|
||||||
category?: string;
|
category?: string;
|
||||||
importance?: string;
|
|
||||||
status?: string;
|
status?: string;
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updatedAt?: string;
|
updatedAt?: string;
|
||||||
@@ -522,9 +519,6 @@ function MesureListContent({
|
|||||||
<table className="w-full">
|
<table className="w-full">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="bg-subtle-bg/30 text-sm font-medium text-tertiary">
|
<tr className="bg-subtle-bg/30 text-sm font-medium text-tertiary">
|
||||||
<th className="w-24 px-4 py-2 text-left">
|
|
||||||
Importance
|
|
||||||
</th>
|
|
||||||
<th className="w-24 px-4 py-2 text-left">
|
<th className="w-24 px-4 py-2 text-left">
|
||||||
Status
|
Status
|
||||||
</th>
|
</th>
|
||||||
@@ -537,11 +531,6 @@ function MesureListContent({
|
|||||||
key={mesure.id || Math.random().toString()}
|
key={mesure.id || Math.random().toString()}
|
||||||
className="hover:bg-h-subtle-bg cursor-pointer"
|
className="hover:bg-h-subtle-bg cursor-pointer"
|
||||||
>
|
>
|
||||||
<td className="w-24 px-4 py-3 align-middle">
|
|
||||||
<Badge variant="outline" className="text-xs">
|
|
||||||
{mesure.importance}
|
|
||||||
</Badge>
|
|
||||||
</td>
|
|
||||||
<td className="w-24 px-4 py-3 align-middle">
|
<td className="w-24 px-4 py-3 align-middle">
|
||||||
<div className="flex items-center justify-center">
|
<div className="flex items-center justify-center">
|
||||||
{mesure.status
|
{mesure.status
|
||||||
@@ -593,12 +582,6 @@ function MesureListContent({
|
|||||||
<h4 className="font-bold text-md">
|
<h4 className="font-bold text-md">
|
||||||
{mesure.name}
|
{mesure.name}
|
||||||
</h4>
|
</h4>
|
||||||
<Badge
|
|
||||||
variant="outline"
|
|
||||||
className="text-xs"
|
|
||||||
>
|
|
||||||
{mesure.importance}
|
|
||||||
</Badge>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{mesure.description && (
|
{mesure.description && (
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ const mesureViewQuery = graphql`
|
|||||||
name
|
name
|
||||||
description
|
description
|
||||||
state
|
state
|
||||||
importance
|
|
||||||
category
|
category
|
||||||
tasks(first: 100) @connection(key: "MesureView_tasks") {
|
tasks(first: 100) @connection(key: "MesureView_tasks") {
|
||||||
__id
|
__id
|
||||||
@@ -573,19 +572,6 @@ function MesureViewContent({
|
|||||||
}
|
}
|
||||||
}, [environment, mesureId]);
|
}, [environment, mesureId]);
|
||||||
|
|
||||||
const formatImportance = (importance: string | undefined): string => {
|
|
||||||
if (!importance) return "";
|
|
||||||
|
|
||||||
const upperImportance = importance.toUpperCase();
|
|
||||||
|
|
||||||
if (upperImportance === "MANDATORY") return "Mandatory";
|
|
||||||
if (upperImportance === "PREFERRED") return "Preferred";
|
|
||||||
if (upperImportance === "ADVANCED") return "Advanced";
|
|
||||||
|
|
||||||
const formatted = importance.toLowerCase();
|
|
||||||
return formatted.charAt(0).toUpperCase() + formatted.slice(1);
|
|
||||||
};
|
|
||||||
|
|
||||||
const formatState = (state: string | undefined): string => {
|
const formatState = (state: string | undefined): string => {
|
||||||
if (!state) return "";
|
if (!state) return "";
|
||||||
|
|
||||||
@@ -613,18 +599,6 @@ function MesureViewContent({
|
|||||||
return "bg-secondary-bg text-primary";
|
return "bg-secondary-bg text-primary";
|
||||||
};
|
};
|
||||||
|
|
||||||
const getImportanceColor = (importance: string | undefined): string => {
|
|
||||||
if (!importance) return "bg-secondary-bg text-primary";
|
|
||||||
|
|
||||||
const upperImportance = importance.toUpperCase();
|
|
||||||
|
|
||||||
if (upperImportance === "MANDATORY") return "bg-red-100 text-red-800";
|
|
||||||
if (upperImportance === "PREFERRED") return "bg-orange-100 text-orange-800";
|
|
||||||
if (upperImportance === "ADVANCED") return "bg-blue-100 text-blue-800";
|
|
||||||
|
|
||||||
return "bg-secondary-bg text-primary";
|
|
||||||
};
|
|
||||||
|
|
||||||
const [updateTask] = useMutation<MesureViewUpdateTaskStateMutationType>(
|
const [updateTask] = useMutation<MesureViewUpdateTaskStateMutationType>(
|
||||||
updateTaskStateMutation
|
updateTaskStateMutation
|
||||||
);
|
);
|
||||||
@@ -1867,13 +1841,6 @@ function MesureViewContent({
|
|||||||
<SelectItem value="NOT_APPLICABLE">Not Applicable</SelectItem>
|
<SelectItem value="NOT_APPLICABLE">Not Applicable</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<div
|
|
||||||
className={`${getImportanceColor(
|
|
||||||
data.mesure.importance
|
|
||||||
)} px-3 py-1 rounded-full text-sm`}
|
|
||||||
>
|
|
||||||
{formatImportance(data.mesure.importance)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ export default function NewMesureView() {
|
|||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
name: "",
|
name: "",
|
||||||
description: "",
|
description: "",
|
||||||
category: "",
|
category: ""
|
||||||
importance: "MADATORY" as "MANDATORY" | "PREFERRED" | "ADVANCED",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const [commit, isInFlight] =
|
const [commit, isInFlight] =
|
||||||
@@ -73,8 +72,7 @@ export default function NewMesureView() {
|
|||||||
organizationId: organizationId!,
|
organizationId: organizationId!,
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
description: formData.description,
|
description: formData.description,
|
||||||
category: formData.category,
|
category: formData.category
|
||||||
importance: formData.importance,
|
|
||||||
},
|
},
|
||||||
connections: [connectionId],
|
connections: [connectionId],
|
||||||
},
|
},
|
||||||
@@ -137,52 +135,6 @@ export default function NewMesureView() {
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<Label className="text-sm">Importance</Label>
|
|
||||||
</div>
|
|
||||||
<div className="flex gap-2">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => handleFieldChange("importance", "MANDATORY")}
|
|
||||||
className={cn(
|
|
||||||
"rounded-full cursor-pointer px-4 py-1 text-sm transition-colors",
|
|
||||||
formData.importance === "MANDATORY"
|
|
||||||
? "bg-red-100 text-red-900 ring-2 ring-red-600 ring-offset-2"
|
|
||||||
: "bg-secondary-bg text-primary hover:bg-h-secondary-bg"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
Mandatory
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => handleFieldChange("importance", "PREFERRED")}
|
|
||||||
className={cn(
|
|
||||||
"rounded-full cursor-pointer px-4 py-1 text-sm transition-colors",
|
|
||||||
formData.importance === "PREFERRED"
|
|
||||||
? "bg-yellow-100 text-yellow-900 ring-2 ring-yellow-600 ring-offset-2"
|
|
||||||
: "bg-secondary-bg text-primary hover:bg-h-secondary-bg"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
Preferred
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => handleFieldChange("importance", "ADVANCED")}
|
|
||||||
className={cn(
|
|
||||||
"rounded-full cursor-pointer px-4 py-1 text-sm transition-colors",
|
|
||||||
formData.importance === "ADVANCED"
|
|
||||||
? "bg-blue-100 text-blue-900 ring-2 ring-blue-600 ring-offset-2"
|
|
||||||
: "bg-secondary-bg text-primary hover:bg-h-secondary-bg"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
Advanced
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex justify-end gap-3">
|
<div className="flex justify-end gap-3">
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<7a5c27ece406a4250a38977e9ed9173f>>
|
* @generated SignedSource<<958d4f8ddfa37ee60ce8db10cfde0f6c>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type EditMesureViewQuery$variables = {
|
export type EditMesureViewQuery$variables = {
|
||||||
mesureId: string;
|
mesureId: string;
|
||||||
};
|
};
|
||||||
@@ -18,7 +17,6 @@ export type EditMesureViewQuery$data = {
|
|||||||
readonly category?: string;
|
readonly category?: string;
|
||||||
readonly description?: string;
|
readonly description?: string;
|
||||||
readonly id?: string;
|
readonly id?: string;
|
||||||
readonly importance?: MesureImportance;
|
|
||||||
readonly name?: string;
|
readonly name?: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -69,13 +67,6 @@ v5 = {
|
|||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "category",
|
"name": "category",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
|
||||||
v6 = {
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "importance",
|
|
||||||
"storageKey": null
|
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
@@ -98,8 +89,7 @@ return {
|
|||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
(v3/*: any*/),
|
(v3/*: any*/),
|
||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/)
|
||||||
(v6/*: any*/)
|
|
||||||
],
|
],
|
||||||
"type": "Mesure",
|
"type": "Mesure",
|
||||||
"abstractKey": null
|
"abstractKey": null
|
||||||
@@ -138,8 +128,7 @@ return {
|
|||||||
"selections": [
|
"selections": [
|
||||||
(v3/*: any*/),
|
(v3/*: any*/),
|
||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/)
|
||||||
(v6/*: any*/)
|
|
||||||
],
|
],
|
||||||
"type": "Mesure",
|
"type": "Mesure",
|
||||||
"abstractKey": null
|
"abstractKey": null
|
||||||
@@ -150,16 +139,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "d38df91a88f32d80da84fc47b7ca17ca",
|
"cacheID": "3dbf7d90b0ae49ce617abdf063f6b908",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "EditMesureViewQuery",
|
"name": "EditMesureViewQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query EditMesureViewQuery(\n $mesureId: ID!\n) {\n node(id: $mesureId) {\n __typename\n ... on Mesure {\n id\n name\n description\n category\n importance\n }\n id\n }\n}\n"
|
"text": "query EditMesureViewQuery(\n $mesureId: ID!\n) {\n node(id: $mesureId) {\n __typename\n ... on Mesure {\n id\n name\n description\n category\n }\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "abca56f710248363bacef919222a8420";
|
(node as any).hash = "97156ec05431ae5b11aa2b5441e8f411";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<869dc4adbc0716aa90912098821ce101>>
|
* @generated SignedSource<<45df343624b1e041e930fd7108cbd726>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,13 +9,11 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type UpdateMesureInput = {
|
export type UpdateMesureInput = {
|
||||||
category?: string | null | undefined;
|
category?: string | null | undefined;
|
||||||
description?: string | null | undefined;
|
description?: string | null | undefined;
|
||||||
id: string;
|
id: string;
|
||||||
importance?: MesureImportance | null | undefined;
|
|
||||||
name?: string | null | undefined;
|
name?: string | null | undefined;
|
||||||
state?: MesureState | null | undefined;
|
state?: MesureState | null | undefined;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<251663bea47f61a5857366afa4cc0d28>>
|
* @generated SignedSource<<35c287e8ba9940b8d697c48c563f41c8>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type ImportMesureInput = {
|
export type ImportMesureInput = {
|
||||||
file: any;
|
file: any;
|
||||||
@@ -27,7 +26,6 @@ export type MesureListViewImportMesureMutation$data = {
|
|||||||
readonly createdAt: string;
|
readonly createdAt: string;
|
||||||
readonly description: string;
|
readonly description: string;
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly importance: MesureImportance;
|
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
readonly state: MesureState;
|
readonly state: MesureState;
|
||||||
readonly updatedAt: string;
|
readonly updatedAt: string;
|
||||||
@@ -109,13 +107,6 @@ v3 = {
|
|||||||
"name": "state",
|
"name": "state",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "importance",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -202,16 +193,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "179ac701005009dc5f30388570061264",
|
"cacheID": "8cf2772dcac48b487c892d2b68a3bb51",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "MesureListViewImportMesureMutation",
|
"name": "MesureListViewImportMesureMutation",
|
||||||
"operationKind": "mutation",
|
"operationKind": "mutation",
|
||||||
"text": "mutation MesureListViewImportMesureMutation(\n $input: ImportMesureInput!\n) {\n importMesure(input: $input) {\n mesureEdges {\n node {\n id\n name\n description\n category\n state\n importance\n createdAt\n updatedAt\n }\n }\n }\n}\n"
|
"text": "mutation MesureListViewImportMesureMutation(\n $input: ImportMesureInput!\n) {\n importMesure(input: $input) {\n mesureEdges {\n node {\n id\n name\n description\n category\n state\n createdAt\n updatedAt\n }\n }\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "c1c9deeaa806b9553b7eb25d8832818c";
|
(node as any).hash = "38c30a8751334cce8ba85a64574d9dd6";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<90d959a85cf60161201cb5736ac6abcf>>
|
* @generated SignedSource<<23a821bbb6c3645f99e769acaf1ccbee>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type MesureListViewQuery$variables = {
|
export type MesureListViewQuery$variables = {
|
||||||
first?: number | null | undefined;
|
first?: number | null | undefined;
|
||||||
@@ -25,7 +24,6 @@ export type MesureListViewQuery$data = {
|
|||||||
readonly createdAt: string;
|
readonly createdAt: string;
|
||||||
readonly description: string;
|
readonly description: string;
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly importance: MesureImportance;
|
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
readonly state: MesureState;
|
readonly state: MesureState;
|
||||||
readonly updatedAt: string;
|
readonly updatedAt: string;
|
||||||
@@ -117,13 +115,6 @@ v5 = [
|
|||||||
"name": "state",
|
"name": "state",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "importance",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -279,7 +270,7 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "9f6e9e1487bd34be972a52077bc91ee8",
|
"cacheID": "f71922f62a78f77f2cfc2de55b48f3d6",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"connection": [
|
"connection": [
|
||||||
@@ -296,11 +287,11 @@ return {
|
|||||||
},
|
},
|
||||||
"name": "MesureListViewQuery",
|
"name": "MesureListViewQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query MesureListViewQuery(\n $organizationId: ID!\n $first: Int\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n mesures(first: $first) {\n edges {\n node {\n id\n name\n description\n category\n state\n importance\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
"text": "query MesureListViewQuery(\n $organizationId: ID!\n $first: Int\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n mesures(first: $first) {\n edges {\n node {\n id\n name\n description\n category\n state\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "47928382749f3bac585927423bcdd09e";
|
(node as any).hash = "d5f2d0ddef43b63261b9a9dfbbf08070";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<911e86f76b51015804e409479ee4068c>>
|
* @generated SignedSource<<ecce6472ee50f706d3e4ba91cba0798e>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
||||||
export type EvidenceType = "FILE" | "LINK";
|
export type EvidenceType = "FILE" | "LINK";
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type TaskState = "DONE" | "TODO";
|
export type TaskState = "DONE" | "TODO";
|
||||||
export type MesureViewQuery$variables = {
|
export type MesureViewQuery$variables = {
|
||||||
@@ -22,7 +21,6 @@ export type MesureViewQuery$data = {
|
|||||||
readonly category?: string;
|
readonly category?: string;
|
||||||
readonly description?: string;
|
readonly description?: string;
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly importance?: MesureImportance;
|
|
||||||
readonly name?: string;
|
readonly name?: string;
|
||||||
readonly state?: MesureState;
|
readonly state?: MesureState;
|
||||||
readonly tasks?: {
|
readonly tasks?: {
|
||||||
@@ -112,24 +110,17 @@ v6 = {
|
|||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "importance",
|
"name": "category",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v7 = {
|
v7 = {
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "category",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
v8 = {
|
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "timeEstimate",
|
"name": "timeEstimate",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v9 = {
|
v8 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "People",
|
"concreteType": "People",
|
||||||
@@ -155,21 +146,21 @@ v9 = {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v10 = {
|
v9 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "__typename",
|
"name": "__typename",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v11 = {
|
v10 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "cursor",
|
"name": "cursor",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v12 = {
|
v11 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "PageInfo",
|
"concreteType": "PageInfo",
|
||||||
@@ -194,7 +185,7 @@ v12 = {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v13 = {
|
v12 = {
|
||||||
"kind": "ClientExtension",
|
"kind": "ClientExtension",
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
@@ -206,7 +197,7 @@ v13 = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
v14 = [
|
v13 = [
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -268,25 +259,25 @@ v14 = [
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v10/*: any*/)
|
(v9/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v11/*: any*/)
|
(v10/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v12/*: any*/),
|
(v11/*: any*/),
|
||||||
(v13/*: any*/)
|
(v12/*: any*/)
|
||||||
],
|
],
|
||||||
v15 = [
|
v14 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 100
|
"value": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v16 = [
|
v15 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
@@ -316,7 +307,6 @@ return {
|
|||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
(v7/*: any*/),
|
|
||||||
{
|
{
|
||||||
"alias": "tasks",
|
"alias": "tasks",
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -345,8 +335,8 @@ return {
|
|||||||
(v3/*: any*/),
|
(v3/*: any*/),
|
||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
|
(v7/*: any*/),
|
||||||
(v8/*: any*/),
|
(v8/*: any*/),
|
||||||
(v9/*: any*/),
|
|
||||||
{
|
{
|
||||||
"alias": "evidences",
|
"alias": "evidences",
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -354,19 +344,19 @@ return {
|
|||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "__MesureView_evidences_connection",
|
"name": "__MesureView_evidences_connection",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": (v14/*: any*/),
|
"selections": (v13/*: any*/),
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v10/*: any*/)
|
(v9/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v11/*: any*/)
|
(v10/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v12/*: any*/),
|
(v11/*: any*/),
|
||||||
(v13/*: any*/)
|
(v12/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
}
|
||||||
@@ -395,7 +385,7 @@ return {
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v10/*: any*/),
|
(v9/*: any*/),
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
{
|
{
|
||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
@@ -404,10 +394,9 @@ return {
|
|||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
(v7/*: any*/),
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v15/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "TaskConnection",
|
"concreteType": "TaskConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "tasks",
|
"name": "tasks",
|
||||||
@@ -433,43 +422,43 @@ return {
|
|||||||
(v3/*: any*/),
|
(v3/*: any*/),
|
||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
|
(v7/*: any*/),
|
||||||
(v8/*: any*/),
|
(v8/*: any*/),
|
||||||
(v9/*: any*/),
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v16/*: any*/),
|
"args": (v15/*: any*/),
|
||||||
"concreteType": "EvidenceConnection",
|
"concreteType": "EvidenceConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "evidences",
|
"name": "evidences",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": (v14/*: any*/),
|
"selections": (v13/*: any*/),
|
||||||
"storageKey": "evidences(first:50)"
|
"storageKey": "evidences(first:50)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v16/*: any*/),
|
"args": (v15/*: any*/),
|
||||||
"filters": null,
|
"filters": null,
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "MesureView_evidences",
|
"key": "MesureView_evidences",
|
||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
"name": "evidences"
|
"name": "evidences"
|
||||||
},
|
},
|
||||||
(v10/*: any*/)
|
(v9/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v11/*: any*/)
|
(v10/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v12/*: any*/),
|
(v11/*: any*/),
|
||||||
(v13/*: any*/)
|
(v12/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "tasks(first:100)"
|
"storageKey": "tasks(first:100)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v15/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"filters": null,
|
"filters": null,
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "MesureView_tasks",
|
"key": "MesureView_tasks",
|
||||||
@@ -486,7 +475,7 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "e4c3abf8e8559e732088a9123863a375",
|
"cacheID": "b4cafbe98bf9830ee31732f39dd6d088",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"connection": [
|
"connection": [
|
||||||
@@ -509,11 +498,11 @@ return {
|
|||||||
},
|
},
|
||||||
"name": "MesureViewQuery",
|
"name": "MesureViewQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query MesureViewQuery(\n $mesureId: ID!\n) {\n mesure: node(id: $mesureId) {\n __typename\n id\n ... on Mesure {\n name\n description\n state\n importance\n category\n tasks(first: 100) {\n edges {\n node {\n id\n name\n description\n state\n timeEstimate\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n evidences(first: 50) {\n edges {\n node {\n id\n mimeType\n filename\n size\n state\n type\n url\n createdAt\n description\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
"text": "query MesureViewQuery(\n $mesureId: ID!\n) {\n mesure: node(id: $mesureId) {\n __typename\n id\n ... on Mesure {\n name\n description\n state\n category\n tasks(first: 100) {\n edges {\n node {\n id\n name\n description\n state\n timeEstimate\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n evidences(first: 50) {\n edges {\n node {\n id\n mimeType\n filename\n size\n state\n type\n url\n createdAt\n description\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "38c0abd51a589411fc60391269af0227";
|
(node as any).hash = "023013720b7bc4cf9062268bffd0571b";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<9dac57f235ab6d16f6b3f78002c83dcc>>
|
* @generated SignedSource<<8e8e8ce00d1ef971d4cb203c17d3abd6>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,13 +9,11 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||||
export type UpdateMesureInput = {
|
export type UpdateMesureInput = {
|
||||||
category?: string | null | undefined;
|
category?: string | null | undefined;
|
||||||
description?: string | null | undefined;
|
description?: string | null | undefined;
|
||||||
id: string;
|
id: string;
|
||||||
importance?: MesureImportance | null | undefined;
|
|
||||||
name?: string | null | undefined;
|
name?: string | null | undefined;
|
||||||
state?: MesureState | null | undefined;
|
state?: MesureState | null | undefined;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<3b585f9a06a084982155a0f356838402>>
|
* @generated SignedSource<<4c1c57380bf4ac13f476346c8bee05fe>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,11 +9,9 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
|
||||||
export type CreateMesureInput = {
|
export type CreateMesureInput = {
|
||||||
category: string;
|
category: string;
|
||||||
description: string;
|
description: string;
|
||||||
importance: MesureImportance;
|
|
||||||
name: string;
|
name: string;
|
||||||
organizationId: string;
|
organizationId: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,17 +29,16 @@ import (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
Mesure struct {
|
Mesure struct {
|
||||||
ID gid.GID `db:"id"`
|
ID gid.GID `db:"id"`
|
||||||
TenantID gid.TenantID `db:"tenant_id"`
|
TenantID gid.TenantID `db:"tenant_id"`
|
||||||
OrganizationID gid.GID `db:"organization_id"`
|
OrganizationID gid.GID `db:"organization_id"`
|
||||||
Category string `db:"category"`
|
Category string `db:"category"`
|
||||||
Name string `db:"name"`
|
Name string `db:"name"`
|
||||||
Description string `db:"description"`
|
Description string `db:"description"`
|
||||||
Importance MesureImportance `db:"importance"`
|
State MesureState `db:"state"`
|
||||||
State MesureState `db:"state"`
|
ReferenceID string `db:"reference_id"`
|
||||||
ReferenceID string `db:"reference_id"`
|
CreatedAt time.Time `db:"created_at"`
|
||||||
CreatedAt time.Time `db:"created_at"`
|
UpdatedAt time.Time `db:"updated_at"`
|
||||||
UpdatedAt time.Time `db:"updated_at"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Mesures []*Mesure
|
Mesures []*Mesure
|
||||||
@@ -71,7 +70,6 @@ WITH msrs AS (
|
|||||||
m.name,
|
m.name,
|
||||||
m.description,
|
m.description,
|
||||||
m.state,
|
m.state,
|
||||||
m.importance,
|
|
||||||
m.reference_id,
|
m.reference_id,
|
||||||
m.created_at,
|
m.created_at,
|
||||||
m.updated_at
|
m.updated_at
|
||||||
@@ -90,7 +88,6 @@ SELECT
|
|||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
state,
|
state,
|
||||||
importance,
|
|
||||||
reference_id,
|
reference_id,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
@@ -137,7 +134,6 @@ WITH mtgtns AS (
|
|||||||
m.name,
|
m.name,
|
||||||
m.description,
|
m.description,
|
||||||
m.state,
|
m.state,
|
||||||
m.importance,
|
|
||||||
m.reference_id,
|
m.reference_id,
|
||||||
m.created_at,
|
m.created_at,
|
||||||
m.updated_at
|
m.updated_at
|
||||||
@@ -156,7 +152,6 @@ SELECT
|
|||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
state,
|
state,
|
||||||
importance,
|
|
||||||
reference_id,
|
reference_id,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
@@ -202,7 +197,6 @@ SELECT
|
|||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
state,
|
state,
|
||||||
importance,
|
|
||||||
reference_id,
|
reference_id,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
@@ -249,7 +243,6 @@ SELECT
|
|||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
state,
|
state,
|
||||||
importance,
|
|
||||||
reference_id,
|
reference_id,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
@@ -294,7 +287,6 @@ INSERT INTO
|
|||||||
organization_id,
|
organization_id,
|
||||||
category,
|
category,
|
||||||
name,
|
name,
|
||||||
importance,
|
|
||||||
state,
|
state,
|
||||||
description,
|
description,
|
||||||
reference_id,
|
reference_id,
|
||||||
@@ -307,7 +299,6 @@ VALUES (
|
|||||||
@organization_id,
|
@organization_id,
|
||||||
@category,
|
@category,
|
||||||
@name,
|
@name,
|
||||||
@importance,
|
|
||||||
@state,
|
@state,
|
||||||
@description,
|
@description,
|
||||||
@reference_id,
|
@reference_id,
|
||||||
@@ -339,7 +330,6 @@ RETURNING
|
|||||||
"organization_id": m.OrganizationID,
|
"organization_id": m.OrganizationID,
|
||||||
"category": m.Category,
|
"category": m.Category,
|
||||||
"name": m.Name,
|
"name": m.Name,
|
||||||
"importance": m.Importance,
|
|
||||||
"state": m.State,
|
"state": m.State,
|
||||||
"description": m.Description,
|
"description": m.Description,
|
||||||
"reference_id": m.ReferenceID,
|
"reference_id": m.ReferenceID,
|
||||||
@@ -375,7 +365,6 @@ INSERT INTO
|
|||||||
organization_id,
|
organization_id,
|
||||||
category,
|
category,
|
||||||
name,
|
name,
|
||||||
importance,
|
|
||||||
state,
|
state,
|
||||||
description,
|
description,
|
||||||
reference_id,
|
reference_id,
|
||||||
@@ -388,7 +377,6 @@ VALUES (
|
|||||||
@organization_id,
|
@organization_id,
|
||||||
@category,
|
@category,
|
||||||
@name,
|
@name,
|
||||||
@importance,
|
|
||||||
@state,
|
@state,
|
||||||
@description,
|
@description,
|
||||||
@reference_id,
|
@reference_id,
|
||||||
@@ -408,7 +396,6 @@ VALUES (
|
|||||||
"created_at": m.CreatedAt,
|
"created_at": m.CreatedAt,
|
||||||
"updated_at": m.UpdatedAt,
|
"updated_at": m.UpdatedAt,
|
||||||
"state": m.State,
|
"state": m.State,
|
||||||
"importance": m.Importance,
|
|
||||||
}
|
}
|
||||||
_, err := conn.Exec(ctx, q, args)
|
_, err := conn.Exec(ctx, q, args)
|
||||||
return err
|
return err
|
||||||
@@ -426,7 +413,6 @@ SET
|
|||||||
description = @description,
|
description = @description,
|
||||||
category = @category,
|
category = @category,
|
||||||
state = @state,
|
state = @state,
|
||||||
importance = @importance,
|
|
||||||
updated_at = @updated_at
|
updated_at = @updated_at
|
||||||
WHERE %s
|
WHERE %s
|
||||||
AND id = @mesure_id
|
AND id = @mesure_id
|
||||||
@@ -439,7 +425,6 @@ WHERE %s
|
|||||||
"description": m.Description,
|
"description": m.Description,
|
||||||
"category": m.Category,
|
"category": m.Category,
|
||||||
"state": m.State,
|
"state": m.State,
|
||||||
"importance": m.Importance,
|
|
||||||
"updated_at": m.UpdatedAt,
|
"updated_at": m.UpdatedAt,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,100 +0,0 @@
|
|||||||
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
|
||||||
//
|
|
||||||
// Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
// purpose with or without fee is hereby granted, provided that the above
|
|
||||||
// copyright notice and this permission notice appear in all copies.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
||||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
||||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
||||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
// PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
package coredata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql/driver"
|
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
type MesureImportance uint8
|
|
||||||
|
|
||||||
const (
|
|
||||||
MesureImportanceMandatory MesureImportance = iota
|
|
||||||
MesureImportancePreferred
|
|
||||||
MesureImportanceAdvanced
|
|
||||||
)
|
|
||||||
|
|
||||||
func (i MesureImportance) String() string {
|
|
||||||
return []string{"MANDATORY", "PREFERRED", "ADVANCED"}[i]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i *MesureImportance) Scan(value interface{}) error {
|
|
||||||
switch v := value.(type) {
|
|
||||||
case uint8:
|
|
||||||
*i = MesureImportance(v)
|
|
||||||
case string:
|
|
||||||
switch v {
|
|
||||||
case "MANDATORY":
|
|
||||||
*i = MesureImportanceMandatory
|
|
||||||
case "PREFERRED":
|
|
||||||
*i = MesureImportancePreferred
|
|
||||||
case "ADVANCED":
|
|
||||||
*i = MesureImportanceAdvanced
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid MesureImportance value: %q", v)
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("unsupported type for MesureImportance: %T", value)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i MesureImportance) Value() (driver.Value, error) {
|
|
||||||
return i.String(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i MesureImportance) MarshalJSON() ([]byte, error) {
|
|
||||||
return json.Marshal(i.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i *MesureImportance) UnmarshalJSON(data []byte) error {
|
|
||||||
var s string
|
|
||||||
if err := json.Unmarshal(data, &s); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
switch s {
|
|
||||||
case "MANDATORY":
|
|
||||||
*i = MesureImportanceMandatory
|
|
||||||
case "PREFERRED":
|
|
||||||
*i = MesureImportancePreferred
|
|
||||||
case "ADVANCED":
|
|
||||||
*i = MesureImportanceAdvanced
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid MesureImportance value: %q", s)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i *MesureImportance) UnmarshalText(text []byte) error {
|
|
||||||
var s string
|
|
||||||
if err := json.Unmarshal(text, &s); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
switch s {
|
|
||||||
case "MANDATORY":
|
|
||||||
*i = MesureImportanceMandatory
|
|
||||||
case "PREFERRED":
|
|
||||||
*i = MesureImportancePreferred
|
|
||||||
case "ADVANCED":
|
|
||||||
*i = MesureImportanceAdvanced
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid MesureImportance value: %q", s)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
1
pkg/coredata/migrations/20250427T082100Z.sql
Normal file
1
pkg/coredata/migrations/20250427T082100Z.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE mesures DROP COLUMN importance;
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
type Risk {
|
|
||||||
id: ID!
|
|
||||||
organizationId: ID!
|
|
||||||
name: String!
|
|
||||||
description: String!
|
|
||||||
category: String!
|
|
||||||
treatment: RiskTreatment!
|
|
||||||
ownerId: ID
|
|
||||||
inherentLikelihood: Int!
|
|
||||||
inherentImpact: Int!
|
|
||||||
residualLikelihood: Int!
|
|
||||||
residualImpact: Int!
|
|
||||||
createdAt: Time!
|
|
||||||
updatedAt: Time!
|
|
||||||
}
|
|
||||||
@@ -36,7 +36,6 @@ type (
|
|||||||
Name string
|
Name string
|
||||||
Description string
|
Description string
|
||||||
Category string
|
Category string
|
||||||
Importance coredata.MesureImportance
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateMesureRequest struct {
|
UpdateMesureRequest struct {
|
||||||
@@ -45,16 +44,13 @@ type (
|
|||||||
Description *string
|
Description *string
|
||||||
Category *string
|
Category *string
|
||||||
State *coredata.MesureState
|
State *coredata.MesureState
|
||||||
Importance *coredata.MesureImportance
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImportMesureRequest struct {
|
ImportMesureRequest struct {
|
||||||
Mesures []struct {
|
Mesures []struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Description string `json:"description"`
|
Category string `json:"category"`
|
||||||
Category string `json:"category"`
|
ReferenceID string `json:"reference-id"`
|
||||||
Importance coredata.MesureImportance `json:"importance"`
|
|
||||||
ReferenceID string `json:"reference-id"`
|
|
||||||
Standards []struct {
|
Standards []struct {
|
||||||
Framework string `json:"framework"`
|
Framework string `json:"framework"`
|
||||||
Control string `json:"control"`
|
Control string `json:"control"`
|
||||||
@@ -157,11 +153,10 @@ func (s MesureService) Import(
|
|||||||
ID: mesureID,
|
ID: mesureID,
|
||||||
OrganizationID: organizationID,
|
OrganizationID: organizationID,
|
||||||
Name: req.Mesures[i].Name,
|
Name: req.Mesures[i].Name,
|
||||||
Description: req.Mesures[i].Description,
|
Description: "",
|
||||||
Category: req.Mesures[i].Category,
|
Category: req.Mesures[i].Category,
|
||||||
State: coredata.MesureStateNotStarted,
|
State: coredata.MesureStateNotStarted,
|
||||||
ReferenceID: req.Mesures[i].ReferenceID,
|
ReferenceID: req.Mesures[i].ReferenceID,
|
||||||
Importance: req.Mesures[i].Importance,
|
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
@@ -289,10 +284,6 @@ func (s MesureService) Update(
|
|||||||
mesure.State = *req.State
|
mesure.State = *req.State
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Importance != nil {
|
|
||||||
mesure.Importance = *req.Importance
|
|
||||||
}
|
|
||||||
|
|
||||||
mesure.UpdatedAt = time.Now()
|
mesure.UpdatedAt = time.Now()
|
||||||
|
|
||||||
if err := mesure.Update(ctx, conn, s.svc.scope); err != nil {
|
if err := mesure.Update(ctx, conn, s.svc.scope); err != nil {
|
||||||
@@ -359,7 +350,6 @@ func (s MesureService) Create(
|
|||||||
Category: req.Category,
|
Category: req.Category,
|
||||||
ReferenceID: "custom-mesure-" + referenceID.String(),
|
ReferenceID: "custom-mesure-" + referenceID.String(),
|
||||||
State: coredata.MesureStateNotStarted,
|
State: coredata.MesureStateNotStarted,
|
||||||
Importance: req.Importance,
|
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,22 +91,6 @@ enum PeopleKind
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MesureImportance
|
|
||||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.MesureImportance") {
|
|
||||||
MANDATORY
|
|
||||||
@goEnum(
|
|
||||||
value: "github.com/getprobo/probo/pkg/coredata.MesureImportanceMandatory"
|
|
||||||
)
|
|
||||||
PREFERRED
|
|
||||||
@goEnum(
|
|
||||||
value: "github.com/getprobo/probo/pkg/coredata.MesureImportancePreferred"
|
|
||||||
)
|
|
||||||
ADVANCED
|
|
||||||
@goEnum(
|
|
||||||
value: "github.com/getprobo/probo/pkg/coredata.MesureImportanceAdvanced"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
enum PolicyStatus
|
enum PolicyStatus
|
||||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
||||||
DRAFT
|
DRAFT
|
||||||
@@ -581,7 +565,6 @@ type Mesure implements Node {
|
|||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: String!
|
||||||
state: MesureState!
|
state: MesureState!
|
||||||
importance: MesureImportance!
|
|
||||||
|
|
||||||
tasks(
|
tasks(
|
||||||
first: Int
|
first: Int
|
||||||
@@ -1083,7 +1066,6 @@ input CreateMesureInput {
|
|||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: String!
|
||||||
category: String!
|
category: String!
|
||||||
importance: MesureImportance!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input UpdateMesureInput {
|
input UpdateMesureInput {
|
||||||
@@ -1092,7 +1074,6 @@ input UpdateMesureInput {
|
|||||||
description: String
|
description: String
|
||||||
category: String
|
category: String
|
||||||
state: MesureState
|
state: MesureState
|
||||||
importance: MesureImportance
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input ImportMesureInput {
|
input ImportMesureInput {
|
||||||
|
|||||||
@@ -283,7 +283,6 @@ type ComplexityRoot struct {
|
|||||||
CreatedAt func(childComplexity int) int
|
CreatedAt func(childComplexity int) int
|
||||||
Description func(childComplexity int) int
|
Description func(childComplexity int) int
|
||||||
ID func(childComplexity int) int
|
ID func(childComplexity int) int
|
||||||
Importance func(childComplexity int) int
|
|
||||||
Name func(childComplexity int) int
|
Name func(childComplexity int) int
|
||||||
Risks func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.RiskOrderBy) int
|
Risks func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.RiskOrderBy) int
|
||||||
State func(childComplexity int) int
|
State func(childComplexity int) int
|
||||||
@@ -1382,13 +1381,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Mesure.ID(childComplexity), true
|
return e.complexity.Mesure.ID(childComplexity), true
|
||||||
|
|
||||||
case "Mesure.importance":
|
|
||||||
if e.complexity.Mesure.Importance == nil {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
return e.complexity.Mesure.Importance(childComplexity), true
|
|
||||||
|
|
||||||
case "Mesure.name":
|
case "Mesure.name":
|
||||||
if e.complexity.Mesure.Name == nil {
|
if e.complexity.Mesure.Name == nil {
|
||||||
break
|
break
|
||||||
@@ -3483,22 +3475,6 @@ enum PeopleKind
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MesureImportance
|
|
||||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.MesureImportance") {
|
|
||||||
MANDATORY
|
|
||||||
@goEnum(
|
|
||||||
value: "github.com/getprobo/probo/pkg/coredata.MesureImportanceMandatory"
|
|
||||||
)
|
|
||||||
PREFERRED
|
|
||||||
@goEnum(
|
|
||||||
value: "github.com/getprobo/probo/pkg/coredata.MesureImportancePreferred"
|
|
||||||
)
|
|
||||||
ADVANCED
|
|
||||||
@goEnum(
|
|
||||||
value: "github.com/getprobo/probo/pkg/coredata.MesureImportanceAdvanced"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
enum PolicyStatus
|
enum PolicyStatus
|
||||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
||||||
DRAFT
|
DRAFT
|
||||||
@@ -3973,7 +3949,6 @@ type Mesure implements Node {
|
|||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: String!
|
||||||
state: MesureState!
|
state: MesureState!
|
||||||
importance: MesureImportance!
|
|
||||||
|
|
||||||
tasks(
|
tasks(
|
||||||
first: Int
|
first: Int
|
||||||
@@ -4475,7 +4450,6 @@ input CreateMesureInput {
|
|||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: String!
|
||||||
category: String!
|
category: String!
|
||||||
importance: MesureImportance!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input UpdateMesureInput {
|
input UpdateMesureInput {
|
||||||
@@ -4484,7 +4458,6 @@ input UpdateMesureInput {
|
|||||||
description: String
|
description: String
|
||||||
category: String
|
category: String
|
||||||
state: MesureState
|
state: MesureState
|
||||||
importance: MesureImportance
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input ImportMesureInput {
|
input ImportMesureInput {
|
||||||
@@ -12165,50 +12138,6 @@ func (ec *executionContext) fieldContext_Mesure_state(_ context.Context, field g
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Mesure_importance(ctx context.Context, field graphql.CollectedField, obj *types.Mesure) (ret graphql.Marshaler) {
|
|
||||||
fc, err := ec.fieldContext_Mesure_importance(ctx, field)
|
|
||||||
if err != nil {
|
|
||||||
return graphql.Null
|
|
||||||
}
|
|
||||||
ctx = graphql.WithFieldContext(ctx, fc)
|
|
||||||
defer func() {
|
|
||||||
if r := recover(); r != nil {
|
|
||||||
ec.Error(ctx, ec.Recover(ctx, r))
|
|
||||||
ret = graphql.Null
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
|
||||||
ctx = rctx // use context from middleware stack in children
|
|
||||||
return obj.Importance, nil
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
ec.Error(ctx, err)
|
|
||||||
return graphql.Null
|
|
||||||
}
|
|
||||||
if resTmp == nil {
|
|
||||||
if !graphql.HasFieldError(ctx, fc) {
|
|
||||||
ec.Errorf(ctx, "must not be null")
|
|
||||||
}
|
|
||||||
return graphql.Null
|
|
||||||
}
|
|
||||||
res := resTmp.(coredata.MesureImportance)
|
|
||||||
fc.Result = res
|
|
||||||
return ec.marshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx, field.Selections, res)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_Mesure_importance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
||||||
fc = &graphql.FieldContext{
|
|
||||||
Object: "Mesure",
|
|
||||||
Field: field,
|
|
||||||
IsMethod: false,
|
|
||||||
IsResolver: false,
|
|
||||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
||||||
return nil, errors.New("field of type MesureImportance does not have child fields")
|
|
||||||
},
|
|
||||||
}
|
|
||||||
return fc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ec *executionContext) _Mesure_tasks(ctx context.Context, field graphql.CollectedField, obj *types.Mesure) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Mesure_tasks(ctx context.Context, field graphql.CollectedField, obj *types.Mesure) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Mesure_tasks(ctx, field)
|
fc, err := ec.fieldContext_Mesure_tasks(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -12677,8 +12606,6 @@ func (ec *executionContext) fieldContext_MesureEdge_node(_ context.Context, fiel
|
|||||||
return ec.fieldContext_Mesure_description(ctx, field)
|
return ec.fieldContext_Mesure_description(ctx, field)
|
||||||
case "state":
|
case "state":
|
||||||
return ec.fieldContext_Mesure_state(ctx, field)
|
return ec.fieldContext_Mesure_state(ctx, field)
|
||||||
case "importance":
|
|
||||||
return ec.fieldContext_Mesure_importance(ctx, field)
|
|
||||||
case "tasks":
|
case "tasks":
|
||||||
return ec.fieldContext_Mesure_tasks(ctx, field)
|
return ec.fieldContext_Mesure_tasks(ctx, field)
|
||||||
case "risks":
|
case "risks":
|
||||||
@@ -19912,8 +19839,6 @@ func (ec *executionContext) fieldContext_UpdateMesurePayload_mesure(_ context.Co
|
|||||||
return ec.fieldContext_Mesure_description(ctx, field)
|
return ec.fieldContext_Mesure_description(ctx, field)
|
||||||
case "state":
|
case "state":
|
||||||
return ec.fieldContext_Mesure_state(ctx, field)
|
return ec.fieldContext_Mesure_state(ctx, field)
|
||||||
case "importance":
|
|
||||||
return ec.fieldContext_Mesure_importance(ctx, field)
|
|
||||||
case "tasks":
|
case "tasks":
|
||||||
return ec.fieldContext_Mesure_tasks(ctx, field)
|
return ec.fieldContext_Mesure_tasks(ctx, field)
|
||||||
case "risks":
|
case "risks":
|
||||||
@@ -25922,7 +25847,7 @@ func (ec *executionContext) unmarshalInputCreateMesureInput(ctx context.Context,
|
|||||||
asMap[k] = v
|
asMap[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldsInOrder := [...]string{"organizationId", "name", "description", "category", "importance"}
|
fieldsInOrder := [...]string{"organizationId", "name", "description", "category"}
|
||||||
for _, k := range fieldsInOrder {
|
for _, k := range fieldsInOrder {
|
||||||
v, ok := asMap[k]
|
v, ok := asMap[k]
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -25957,13 +25882,6 @@ func (ec *executionContext) unmarshalInputCreateMesureInput(ctx context.Context,
|
|||||||
return it, err
|
return it, err
|
||||||
}
|
}
|
||||||
it.Category = data
|
it.Category = data
|
||||||
case "importance":
|
|
||||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("importance"))
|
|
||||||
data, err := ec.unmarshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx, v)
|
|
||||||
if err != nil {
|
|
||||||
return it, err
|
|
||||||
}
|
|
||||||
it.Importance = data
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27514,7 +27432,7 @@ func (ec *executionContext) unmarshalInputUpdateMesureInput(ctx context.Context,
|
|||||||
asMap[k] = v
|
asMap[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldsInOrder := [...]string{"id", "name", "description", "category", "state", "importance"}
|
fieldsInOrder := [...]string{"id", "name", "description", "category", "state"}
|
||||||
for _, k := range fieldsInOrder {
|
for _, k := range fieldsInOrder {
|
||||||
v, ok := asMap[k]
|
v, ok := asMap[k]
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -27556,13 +27474,6 @@ func (ec *executionContext) unmarshalInputUpdateMesureInput(ctx context.Context,
|
|||||||
return it, err
|
return it, err
|
||||||
}
|
}
|
||||||
it.State = data
|
it.State = data
|
||||||
case "importance":
|
|
||||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("importance"))
|
|
||||||
data, err := ec.unmarshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx, v)
|
|
||||||
if err != nil {
|
|
||||||
return it, err
|
|
||||||
}
|
|
||||||
it.Importance = data
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30417,11 +30328,6 @@ func (ec *executionContext) _Mesure(ctx context.Context, sel ast.SelectionSet, o
|
|||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
atomic.AddUint32(&out.Invalids, 1)
|
atomic.AddUint32(&out.Invalids, 1)
|
||||||
}
|
}
|
||||||
case "importance":
|
|
||||||
out.Values[i] = ec._Mesure_importance(ctx, field, obj)
|
|
||||||
if out.Values[i] == graphql.Null {
|
|
||||||
atomic.AddUint32(&out.Invalids, 1)
|
|
||||||
}
|
|
||||||
case "tasks":
|
case "tasks":
|
||||||
field := field
|
field := field
|
||||||
|
|
||||||
@@ -35733,35 +35639,6 @@ func (ec *executionContext) marshalNMesureEdge2ᚖgithubᚗcomᚋgetproboᚋprob
|
|||||||
return ec._MesureEdge(ctx, sel, v)
|
return ec._MesureEdge(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx context.Context, v any) (coredata.MesureImportance, error) {
|
|
||||||
tmp, err := graphql.UnmarshalString(v)
|
|
||||||
res := unmarshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance[tmp]
|
|
||||||
return res, graphql.ErrorOnPath(ctx, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ec *executionContext) marshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx context.Context, sel ast.SelectionSet, v coredata.MesureImportance) graphql.Marshaler {
|
|
||||||
res := graphql.MarshalString(marshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance[v])
|
|
||||||
if res == graphql.Null {
|
|
||||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
||||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
unmarshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance = map[string]coredata.MesureImportance{
|
|
||||||
"MANDATORY": coredata.MesureImportanceMandatory,
|
|
||||||
"PREFERRED": coredata.MesureImportancePreferred,
|
|
||||||
"ADVANCED": coredata.MesureImportanceAdvanced,
|
|
||||||
}
|
|
||||||
marshalNMesureImportance2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance = map[coredata.MesureImportance]string{
|
|
||||||
coredata.MesureImportanceMandatory: "MANDATORY",
|
|
||||||
coredata.MesureImportancePreferred: "PREFERRED",
|
|
||||||
coredata.MesureImportanceAdvanced: "ADVANCED",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalNMesureOrderField2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureOrderField(ctx context.Context, v any) (coredata.MesureOrderField, error) {
|
func (ec *executionContext) unmarshalNMesureOrderField2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureOrderField(ctx context.Context, v any) (coredata.MesureOrderField, error) {
|
||||||
tmp, err := graphql.UnmarshalString(v)
|
tmp, err := graphql.UnmarshalString(v)
|
||||||
res := unmarshalNMesureOrderField2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureOrderField[tmp]
|
res := unmarshalNMesureOrderField2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureOrderField[tmp]
|
||||||
@@ -37571,36 +37448,6 @@ func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.Sele
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx context.Context, v any) (*coredata.MesureImportance, error) {
|
|
||||||
if v == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
tmp, err := graphql.UnmarshalString(v)
|
|
||||||
res := unmarshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance[tmp]
|
|
||||||
return &res, graphql.ErrorOnPath(ctx, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ec *executionContext) marshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance(ctx context.Context, sel ast.SelectionSet, v *coredata.MesureImportance) graphql.Marshaler {
|
|
||||||
if v == nil {
|
|
||||||
return graphql.Null
|
|
||||||
}
|
|
||||||
res := graphql.MarshalString(marshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance[*v])
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
unmarshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance = map[string]coredata.MesureImportance{
|
|
||||||
"MANDATORY": coredata.MesureImportanceMandatory,
|
|
||||||
"PREFERRED": coredata.MesureImportancePreferred,
|
|
||||||
"ADVANCED": coredata.MesureImportanceAdvanced,
|
|
||||||
}
|
|
||||||
marshalOMesureImportance2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐMesureImportance = map[coredata.MesureImportance]string{
|
|
||||||
coredata.MesureImportanceMandatory: "MANDATORY",
|
|
||||||
coredata.MesureImportancePreferred: "PREFERRED",
|
|
||||||
coredata.MesureImportanceAdvanced: "ADVANCED",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalOMesureOrder2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐMesureOrderBy(ctx context.Context, v any) (*types.MesureOrderBy, error) {
|
func (ec *executionContext) unmarshalOMesureOrder2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐMesureOrderBy(ctx context.Context, v any) (*types.MesureOrderBy, error) {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ func NewMesure(c *coredata.Mesure) *Mesure {
|
|||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
Description: c.Description,
|
Description: c.Description,
|
||||||
State: c.State,
|
State: c.State,
|
||||||
Importance: c.Importance,
|
|
||||||
CreatedAt: c.CreatedAt,
|
CreatedAt: c.CreatedAt,
|
||||||
UpdatedAt: c.UpdatedAt,
|
UpdatedAt: c.UpdatedAt,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,11 +128,10 @@ type CreateFrameworkPayload struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CreateMesureInput struct {
|
type CreateMesureInput struct {
|
||||||
OrganizationID gid.GID `json:"organizationId"`
|
OrganizationID gid.GID `json:"organizationId"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Category string `json:"category"`
|
Category string `json:"category"`
|
||||||
Importance coredata.MesureImportance `json:"importance"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateMesurePayload struct {
|
type CreateMesurePayload struct {
|
||||||
@@ -456,17 +455,16 @@ type InviteUserPayload struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Mesure struct {
|
type Mesure struct {
|
||||||
ID gid.GID `json:"id"`
|
ID gid.GID `json:"id"`
|
||||||
Category string `json:"category"`
|
Category string `json:"category"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
State coredata.MesureState `json:"state"`
|
State coredata.MesureState `json:"state"`
|
||||||
Importance coredata.MesureImportance `json:"importance"`
|
Tasks *TaskConnection `json:"tasks"`
|
||||||
Tasks *TaskConnection `json:"tasks"`
|
Risks *RiskConnection `json:"risks"`
|
||||||
Risks *RiskConnection `json:"risks"`
|
Controls *ControlConnection `json:"controls"`
|
||||||
Controls *ControlConnection `json:"controls"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Mesure) IsNode() {}
|
func (Mesure) IsNode() {}
|
||||||
@@ -680,12 +678,11 @@ type UpdateFrameworkPayload struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type UpdateMesureInput struct {
|
type UpdateMesureInput struct {
|
||||||
ID gid.GID `json:"id"`
|
ID gid.GID `json:"id"`
|
||||||
Name *string `json:"name,omitempty"`
|
Name *string `json:"name,omitempty"`
|
||||||
Description *string `json:"description,omitempty"`
|
Description *string `json:"description,omitempty"`
|
||||||
Category *string `json:"category,omitempty"`
|
Category *string `json:"category,omitempty"`
|
||||||
State *coredata.MesureState `json:"state,omitempty"`
|
State *coredata.MesureState `json:"state,omitempty"`
|
||||||
Importance *coredata.MesureImportance `json:"importance,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateMesurePayload struct {
|
type UpdateMesurePayload struct {
|
||||||
|
|||||||
@@ -539,7 +539,6 @@ func (r *mutationResolver) CreateMesure(ctx context.Context, input types.CreateM
|
|||||||
Name: input.Name,
|
Name: input.Name,
|
||||||
Description: input.Description,
|
Description: input.Description,
|
||||||
Category: input.Category,
|
Category: input.Category,
|
||||||
Importance: input.Importance,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Errorf("cannot create mesure: %w", err))
|
panic(fmt.Errorf("cannot create mesure: %w", err))
|
||||||
@@ -559,7 +558,6 @@ func (r *mutationResolver) UpdateMesure(ctx context.Context, input types.UpdateM
|
|||||||
Name: input.Name,
|
Name: input.Name,
|
||||||
Description: input.Description,
|
Description: input.Description,
|
||||||
Category: input.Category,
|
Category: input.Category,
|
||||||
Importance: input.Importance,
|
|
||||||
State: input.State,
|
State: input.State,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user