Remove measure importance
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -65,7 +65,6 @@ const linkedMesuresQuery = graphql`
|
||||
name
|
||||
description
|
||||
category
|
||||
importance
|
||||
state
|
||||
}
|
||||
}
|
||||
@@ -88,7 +87,6 @@ const organizationMesuresQuery = graphql`
|
||||
name
|
||||
description
|
||||
category
|
||||
importance
|
||||
state
|
||||
}
|
||||
}
|
||||
@@ -721,24 +719,6 @@ export function Control({
|
||||
setIsPolicyMappingDialogOpen(true);
|
||||
}, [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 => {
|
||||
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 => {
|
||||
if (!state) return "bg-secondary-bg text-secondary";
|
||||
|
||||
@@ -871,9 +834,6 @@ export function Control({
|
||||
<thead className="sticky top-0 bg-white">
|
||||
<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">
|
||||
Importance
|
||||
</th>
|
||||
<th className="py-3 px-4 font-medium">State</th>
|
||||
<th className="py-3 px-4 font-medium text-right">
|
||||
Actions
|
||||
@@ -898,15 +858,6 @@ export function Control({
|
||||
</div>
|
||||
)}
|
||||
</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">
|
||||
<div
|
||||
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
||||
@@ -1000,7 +951,6 @@ export function Control({
|
||||
<thead>
|
||||
<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">Importance</th>
|
||||
<th className="py-3 px-4 font-medium">State</th>
|
||||
<th className="py-3 px-4 font-medium text-right">
|
||||
Actions
|
||||
@@ -1021,15 +971,6 @@ export function Control({
|
||||
</div>
|
||||
)}
|
||||
</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">
|
||||
<div
|
||||
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<03360061cfc99eaa1ec9921a815f9fa0>>
|
||||
* @generated SignedSource<<94f5c5a041ae3730b8f4a71ad63530a8>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,6 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ControlLinkedMesuresQuery$variables = {
|
||||
controlId: string;
|
||||
@@ -23,7 +22,6 @@ export type ControlLinkedMesuresQuery$data = {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly importance: MesureImportance;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
};
|
||||
@@ -104,13 +102,6 @@ v4 = [
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "importance",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -253,7 +244,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "19d9240a60b26d765a93e00be9e1e83f",
|
||||
"cacheID": "b29cb1662103fc42abf16fa6b3458a68",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -270,11 +261,11 @@ return {
|
||||
},
|
||||
"name": "ControlLinkedMesuresQuery",
|
||||
"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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<345a2b05f66a0bb630eea3c12f549e52>>
|
||||
* @generated SignedSource<<862b2210a9d569a05063cebc805bdd01>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,6 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ControlOrganizationMesuresQuery$variables = {
|
||||
organizationId: string;
|
||||
@@ -23,7 +22,6 @@ export type ControlOrganizationMesuresQuery$data = {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly importance: MesureImportance;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
};
|
||||
@@ -104,13 +102,6 @@ v4 = [
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "importance",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -253,7 +244,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "59ceb60db60754876774a3856686b35c",
|
||||
"cacheID": "bb1066800bfa28aaa64a2fd1f12c5924",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -270,11 +261,11 @@ return {
|
||||
},
|
||||
"name": "ControlOrganizationMesuresQuery",
|
||||
"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;
|
||||
|
||||
@@ -26,7 +26,6 @@ const editMesureQuery = graphql`
|
||||
name
|
||||
description
|
||||
category
|
||||
importance
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,8 +58,7 @@ function EditMesureViewContent({
|
||||
const [formData, setFormData] = useState({
|
||||
name: mesure.name ?? "",
|
||||
description: mesure.description ?? "",
|
||||
category: mesure.category ?? "",
|
||||
importance: mesure.importance,
|
||||
category: mesure.category ?? ""
|
||||
});
|
||||
|
||||
const [commit, isInFlight] =
|
||||
@@ -91,8 +89,7 @@ function EditMesureViewContent({
|
||||
id: mesureId!,
|
||||
name: formData.name,
|
||||
description: formData.description,
|
||||
category: formData.category,
|
||||
importance: formData.importance,
|
||||
category: formData.category
|
||||
},
|
||||
},
|
||||
onCompleted(data, errors) {
|
||||
@@ -152,52 +149,6 @@ function EditMesureViewContent({
|
||||
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">
|
||||
<Button
|
||||
type="button"
|
||||
|
||||
@@ -51,7 +51,6 @@ const mesureListViewQuery = graphql`
|
||||
description
|
||||
category
|
||||
state
|
||||
importance
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
@@ -75,7 +74,6 @@ const importMesureMutation = graphql`
|
||||
description
|
||||
category
|
||||
state
|
||||
importance
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
@@ -90,7 +88,6 @@ interface Mesure {
|
||||
description?: string;
|
||||
state?: string;
|
||||
category?: string;
|
||||
importance?: string;
|
||||
status?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
@@ -522,9 +519,6 @@ function MesureListContent({
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
<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">
|
||||
Status
|
||||
</th>
|
||||
@@ -537,11 +531,6 @@ function MesureListContent({
|
||||
key={mesure.id || Math.random().toString()}
|
||||
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">
|
||||
<div className="flex items-center justify-center">
|
||||
{mesure.status
|
||||
@@ -593,12 +582,6 @@ function MesureListContent({
|
||||
<h4 className="font-bold text-md">
|
||||
{mesure.name}
|
||||
</h4>
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="text-xs"
|
||||
>
|
||||
{mesure.importance}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{mesure.description && (
|
||||
|
||||
@@ -152,7 +152,6 @@ const mesureViewQuery = graphql`
|
||||
name
|
||||
description
|
||||
state
|
||||
importance
|
||||
category
|
||||
tasks(first: 100) @connection(key: "MesureView_tasks") {
|
||||
__id
|
||||
@@ -573,19 +572,6 @@ function MesureViewContent({
|
||||
}
|
||||
}, [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 => {
|
||||
if (!state) return "";
|
||||
|
||||
@@ -613,18 +599,6 @@ function MesureViewContent({
|
||||
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>(
|
||||
updateTaskStateMutation
|
||||
);
|
||||
@@ -1867,13 +1841,6 @@ function MesureViewContent({
|
||||
<SelectItem value="NOT_APPLICABLE">Not Applicable</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<div
|
||||
className={`${getImportanceColor(
|
||||
data.mesure.importance
|
||||
)} px-3 py-1 rounded-full text-sm`}
|
||||
>
|
||||
{formatImportance(data.mesure.importance)}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -36,8 +36,7 @@ export default function NewMesureView() {
|
||||
const [formData, setFormData] = useState({
|
||||
name: "",
|
||||
description: "",
|
||||
category: "",
|
||||
importance: "MADATORY" as "MANDATORY" | "PREFERRED" | "ADVANCED",
|
||||
category: ""
|
||||
});
|
||||
|
||||
const [commit, isInFlight] =
|
||||
@@ -73,8 +72,7 @@ export default function NewMesureView() {
|
||||
organizationId: organizationId!,
|
||||
name: formData.name,
|
||||
description: formData.description,
|
||||
category: formData.category,
|
||||
importance: formData.importance,
|
||||
category: formData.category
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
@@ -137,52 +135,6 @@ export default function NewMesureView() {
|
||||
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">
|
||||
<Button
|
||||
type="button"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<7a5c27ece406a4250a38977e9ed9173f>>
|
||||
* @generated SignedSource<<958d4f8ddfa37ee60ce8db10cfde0f6c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,6 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type EditMesureViewQuery$variables = {
|
||||
mesureId: string;
|
||||
};
|
||||
@@ -18,7 +17,6 @@ export type EditMesureViewQuery$data = {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id?: string;
|
||||
readonly importance?: MesureImportance;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
@@ -69,13 +67,6 @@ v5 = {
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "importance",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
@@ -98,8 +89,7 @@ return {
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/)
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "Mesure",
|
||||
"abstractKey": null
|
||||
@@ -138,8 +128,7 @@ return {
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/)
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "Mesure",
|
||||
"abstractKey": null
|
||||
@@ -150,16 +139,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "d38df91a88f32d80da84fc47b7ca17ca",
|
||||
"cacheID": "3dbf7d90b0ae49ce617abdf063f6b908",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditMesureViewQuery",
|
||||
"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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<869dc4adbc0716aa90912098821ce101>>
|
||||
* @generated SignedSource<<45df343624b1e041e930fd7108cbd726>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,13 +9,11 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMesureInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
id: string;
|
||||
importance?: MesureImportance | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
state?: MesureState | null | undefined;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<251663bea47f61a5857366afa4cc0d28>>
|
||||
* @generated SignedSource<<35c287e8ba9940b8d697c48c563f41c8>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,6 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ImportMesureInput = {
|
||||
file: any;
|
||||
@@ -27,7 +26,6 @@ export type MesureListViewImportMesureMutation$data = {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly importance: MesureImportance;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly updatedAt: string;
|
||||
@@ -109,13 +107,6 @@ v3 = {
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "importance",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -202,16 +193,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "179ac701005009dc5f30388570061264",
|
||||
"cacheID": "8cf2772dcac48b487c892d2b68a3bb51",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureListViewImportMesureMutation",
|
||||
"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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<90d959a85cf60161201cb5736ac6abcf>>
|
||||
* @generated SignedSource<<23a821bbb6c3645f99e769acaf1ccbee>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,6 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MesureListViewQuery$variables = {
|
||||
first?: number | null | undefined;
|
||||
@@ -25,7 +24,6 @@ export type MesureListViewQuery$data = {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly importance: MesureImportance;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly updatedAt: string;
|
||||
@@ -117,13 +115,6 @@ v5 = [
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "importance",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -279,7 +270,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "9f6e9e1487bd34be972a52077bc91ee8",
|
||||
"cacheID": "f71922f62a78f77f2cfc2de55b48f3d6",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -296,11 +287,11 @@ return {
|
||||
},
|
||||
"name": "MesureListViewQuery",
|
||||
"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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<911e86f76b51015804e409479ee4068c>>
|
||||
* @generated SignedSource<<ecce6472ee50f706d3e4ba91cba0798e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -11,7 +11,6 @@
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
||||
export type EvidenceType = "FILE" | "LINK";
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type MesureViewQuery$variables = {
|
||||
@@ -22,7 +21,6 @@ export type MesureViewQuery$data = {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id: string;
|
||||
readonly importance?: MesureImportance;
|
||||
readonly name?: string;
|
||||
readonly state?: MesureState;
|
||||
readonly tasks?: {
|
||||
@@ -112,24 +110,17 @@ v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "importance",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "timeEstimate",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
@@ -155,21 +146,21 @@ v9 = {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
@@ -194,7 +185,7 @@ v12 = {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v13 = {
|
||||
v12 = {
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
@@ -206,7 +197,7 @@ v13 = {
|
||||
}
|
||||
]
|
||||
},
|
||||
v14 = [
|
||||
v13 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -268,25 +259,25 @@ v14 = [
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/),
|
||||
(v10/*: any*/)
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/)
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/)
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
v15 = [
|
||||
v14 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
],
|
||||
v16 = [
|
||||
v15 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
@@ -316,7 +307,6 @@ return {
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
{
|
||||
"alias": "tasks",
|
||||
"args": null,
|
||||
@@ -345,8 +335,8 @@ return {
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
{
|
||||
"alias": "evidences",
|
||||
"args": null,
|
||||
@@ -354,19 +344,19 @@ return {
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureView_evidences_connection",
|
||||
"plural": false,
|
||||
"selections": (v14/*: any*/),
|
||||
"selections": (v13/*: any*/),
|
||||
"storageKey": null
|
||||
},
|
||||
(v10/*: any*/)
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/)
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/)
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -395,7 +385,7 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v10/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
@@ -404,10 +394,9 @@ return {
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"args": (v14/*: any*/),
|
||||
"concreteType": "TaskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "tasks",
|
||||
@@ -433,43 +422,43 @@ return {
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v16/*: any*/),
|
||||
"args": (v15/*: any*/),
|
||||
"concreteType": "EvidenceConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "evidences",
|
||||
"plural": false,
|
||||
"selections": (v14/*: any*/),
|
||||
"selections": (v13/*: any*/),
|
||||
"storageKey": "evidences(first:50)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v16/*: any*/),
|
||||
"args": (v15/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureView_evidences",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "evidences"
|
||||
},
|
||||
(v10/*: any*/)
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/)
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/)
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
"storageKey": "tasks(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"args": (v14/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureView_tasks",
|
||||
@@ -486,7 +475,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "e4c3abf8e8559e732088a9123863a375",
|
||||
"cacheID": "b4cafbe98bf9830ee31732f39dd6d088",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -509,11 +498,11 @@ return {
|
||||
},
|
||||
"name": "MesureViewQuery",
|
||||
"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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<9dac57f235ab6d16f6b3f78002c83dcc>>
|
||||
* @generated SignedSource<<8e8e8ce00d1ef971d4cb203c17d3abd6>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,13 +9,11 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMesureInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
id: string;
|
||||
importance?: MesureImportance | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
state?: MesureState | null | undefined;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<3b585f9a06a084982155a0f356838402>>
|
||||
* @generated SignedSource<<4c1c57380bf4ac13f476346c8bee05fe>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,11 +9,9 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type CreateMesureInput = {
|
||||
category: string;
|
||||
description: string;
|
||||
importance: MesureImportance;
|
||||
name: string;
|
||||
organizationId: string;
|
||||
};
|
||||
|
||||
@@ -29,17 +29,16 @@ import (
|
||||
|
||||
type (
|
||||
Mesure struct {
|
||||
ID gid.GID `db:"id"`
|
||||
TenantID gid.TenantID `db:"tenant_id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
Category string `db:"category"`
|
||||
Name string `db:"name"`
|
||||
Description string `db:"description"`
|
||||
Importance MesureImportance `db:"importance"`
|
||||
State MesureState `db:"state"`
|
||||
ReferenceID string `db:"reference_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
ID gid.GID `db:"id"`
|
||||
TenantID gid.TenantID `db:"tenant_id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
Category string `db:"category"`
|
||||
Name string `db:"name"`
|
||||
Description string `db:"description"`
|
||||
State MesureState `db:"state"`
|
||||
ReferenceID string `db:"reference_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
Mesures []*Mesure
|
||||
@@ -71,7 +70,6 @@ WITH msrs AS (
|
||||
m.name,
|
||||
m.description,
|
||||
m.state,
|
||||
m.importance,
|
||||
m.reference_id,
|
||||
m.created_at,
|
||||
m.updated_at
|
||||
@@ -90,7 +88,6 @@ SELECT
|
||||
name,
|
||||
description,
|
||||
state,
|
||||
importance,
|
||||
reference_id,
|
||||
created_at,
|
||||
updated_at
|
||||
@@ -137,7 +134,6 @@ WITH mtgtns AS (
|
||||
m.name,
|
||||
m.description,
|
||||
m.state,
|
||||
m.importance,
|
||||
m.reference_id,
|
||||
m.created_at,
|
||||
m.updated_at
|
||||
@@ -156,7 +152,6 @@ SELECT
|
||||
name,
|
||||
description,
|
||||
state,
|
||||
importance,
|
||||
reference_id,
|
||||
created_at,
|
||||
updated_at
|
||||
@@ -202,7 +197,6 @@ SELECT
|
||||
name,
|
||||
description,
|
||||
state,
|
||||
importance,
|
||||
reference_id,
|
||||
created_at,
|
||||
updated_at
|
||||
@@ -249,7 +243,6 @@ SELECT
|
||||
name,
|
||||
description,
|
||||
state,
|
||||
importance,
|
||||
reference_id,
|
||||
created_at,
|
||||
updated_at
|
||||
@@ -294,7 +287,6 @@ INSERT INTO
|
||||
organization_id,
|
||||
category,
|
||||
name,
|
||||
importance,
|
||||
state,
|
||||
description,
|
||||
reference_id,
|
||||
@@ -307,7 +299,6 @@ VALUES (
|
||||
@organization_id,
|
||||
@category,
|
||||
@name,
|
||||
@importance,
|
||||
@state,
|
||||
@description,
|
||||
@reference_id,
|
||||
@@ -339,7 +330,6 @@ RETURNING
|
||||
"organization_id": m.OrganizationID,
|
||||
"category": m.Category,
|
||||
"name": m.Name,
|
||||
"importance": m.Importance,
|
||||
"state": m.State,
|
||||
"description": m.Description,
|
||||
"reference_id": m.ReferenceID,
|
||||
@@ -375,7 +365,6 @@ INSERT INTO
|
||||
organization_id,
|
||||
category,
|
||||
name,
|
||||
importance,
|
||||
state,
|
||||
description,
|
||||
reference_id,
|
||||
@@ -388,7 +377,6 @@ VALUES (
|
||||
@organization_id,
|
||||
@category,
|
||||
@name,
|
||||
@importance,
|
||||
@state,
|
||||
@description,
|
||||
@reference_id,
|
||||
@@ -408,7 +396,6 @@ VALUES (
|
||||
"created_at": m.CreatedAt,
|
||||
"updated_at": m.UpdatedAt,
|
||||
"state": m.State,
|
||||
"importance": m.Importance,
|
||||
}
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
return err
|
||||
@@ -426,7 +413,6 @@ SET
|
||||
description = @description,
|
||||
category = @category,
|
||||
state = @state,
|
||||
importance = @importance,
|
||||
updated_at = @updated_at
|
||||
WHERE %s
|
||||
AND id = @mesure_id
|
||||
@@ -439,7 +425,6 @@ WHERE %s
|
||||
"description": m.Description,
|
||||
"category": m.Category,
|
||||
"state": m.State,
|
||||
"importance": m.Importance,
|
||||
"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
|
||||
Description string
|
||||
Category string
|
||||
Importance coredata.MesureImportance
|
||||
}
|
||||
|
||||
UpdateMesureRequest struct {
|
||||
@@ -45,16 +44,13 @@ type (
|
||||
Description *string
|
||||
Category *string
|
||||
State *coredata.MesureState
|
||||
Importance *coredata.MesureImportance
|
||||
}
|
||||
|
||||
ImportMesureRequest struct {
|
||||
Mesures []struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
Importance coredata.MesureImportance `json:"importance"`
|
||||
ReferenceID string `json:"reference-id"`
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category"`
|
||||
ReferenceID string `json:"reference-id"`
|
||||
Standards []struct {
|
||||
Framework string `json:"framework"`
|
||||
Control string `json:"control"`
|
||||
@@ -157,11 +153,10 @@ func (s MesureService) Import(
|
||||
ID: mesureID,
|
||||
OrganizationID: organizationID,
|
||||
Name: req.Mesures[i].Name,
|
||||
Description: req.Mesures[i].Description,
|
||||
Description: "",
|
||||
Category: req.Mesures[i].Category,
|
||||
State: coredata.MesureStateNotStarted,
|
||||
ReferenceID: req.Mesures[i].ReferenceID,
|
||||
Importance: req.Mesures[i].Importance,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
@@ -289,10 +284,6 @@ func (s MesureService) Update(
|
||||
mesure.State = *req.State
|
||||
}
|
||||
|
||||
if req.Importance != nil {
|
||||
mesure.Importance = *req.Importance
|
||||
}
|
||||
|
||||
mesure.UpdatedAt = time.Now()
|
||||
|
||||
if err := mesure.Update(ctx, conn, s.svc.scope); err != nil {
|
||||
@@ -359,7 +350,6 @@ func (s MesureService) Create(
|
||||
Category: req.Category,
|
||||
ReferenceID: "custom-mesure-" + referenceID.String(),
|
||||
State: coredata.MesureStateNotStarted,
|
||||
Importance: req.Importance,
|
||||
CreatedAt: 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
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
||||
DRAFT
|
||||
@@ -581,7 +565,6 @@ type Mesure implements Node {
|
||||
name: String!
|
||||
description: String!
|
||||
state: MesureState!
|
||||
importance: MesureImportance!
|
||||
|
||||
tasks(
|
||||
first: Int
|
||||
@@ -1083,7 +1066,6 @@ input CreateMesureInput {
|
||||
name: String!
|
||||
description: String!
|
||||
category: String!
|
||||
importance: MesureImportance!
|
||||
}
|
||||
|
||||
input UpdateMesureInput {
|
||||
@@ -1092,7 +1074,6 @@ input UpdateMesureInput {
|
||||
description: String
|
||||
category: String
|
||||
state: MesureState
|
||||
importance: MesureImportance
|
||||
}
|
||||
|
||||
input ImportMesureInput {
|
||||
|
||||
@@ -283,7 +283,6 @@ type ComplexityRoot struct {
|
||||
CreatedAt func(childComplexity int) int
|
||||
Description func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Importance 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
|
||||
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
|
||||
|
||||
case "Mesure.importance":
|
||||
if e.complexity.Mesure.Importance == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Mesure.Importance(childComplexity), true
|
||||
|
||||
case "Mesure.name":
|
||||
if e.complexity.Mesure.Name == nil {
|
||||
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
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
||||
DRAFT
|
||||
@@ -3973,7 +3949,6 @@ type Mesure implements Node {
|
||||
name: String!
|
||||
description: String!
|
||||
state: MesureState!
|
||||
importance: MesureImportance!
|
||||
|
||||
tasks(
|
||||
first: Int
|
||||
@@ -4475,7 +4450,6 @@ input CreateMesureInput {
|
||||
name: String!
|
||||
description: String!
|
||||
category: String!
|
||||
importance: MesureImportance!
|
||||
}
|
||||
|
||||
input UpdateMesureInput {
|
||||
@@ -4484,7 +4458,6 @@ input UpdateMesureInput {
|
||||
description: String
|
||||
category: String
|
||||
state: MesureState
|
||||
importance: MesureImportance
|
||||
}
|
||||
|
||||
input ImportMesureInput {
|
||||
@@ -12165,50 +12138,6 @@ func (ec *executionContext) fieldContext_Mesure_state(_ context.Context, field g
|
||||
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) {
|
||||
fc, err := ec.fieldContext_Mesure_tasks(ctx, field)
|
||||
if err != nil {
|
||||
@@ -12677,8 +12606,6 @@ func (ec *executionContext) fieldContext_MesureEdge_node(_ context.Context, fiel
|
||||
return ec.fieldContext_Mesure_description(ctx, field)
|
||||
case "state":
|
||||
return ec.fieldContext_Mesure_state(ctx, field)
|
||||
case "importance":
|
||||
return ec.fieldContext_Mesure_importance(ctx, field)
|
||||
case "tasks":
|
||||
return ec.fieldContext_Mesure_tasks(ctx, field)
|
||||
case "risks":
|
||||
@@ -19912,8 +19839,6 @@ func (ec *executionContext) fieldContext_UpdateMesurePayload_mesure(_ context.Co
|
||||
return ec.fieldContext_Mesure_description(ctx, field)
|
||||
case "state":
|
||||
return ec.fieldContext_Mesure_state(ctx, field)
|
||||
case "importance":
|
||||
return ec.fieldContext_Mesure_importance(ctx, field)
|
||||
case "tasks":
|
||||
return ec.fieldContext_Mesure_tasks(ctx, field)
|
||||
case "risks":
|
||||
@@ -25922,7 +25847,7 @@ func (ec *executionContext) unmarshalInputCreateMesureInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "description", "category", "importance"}
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "description", "category"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -25957,13 +25882,6 @@ func (ec *executionContext) unmarshalInputCreateMesureInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id", "name", "description", "category", "state", "importance"}
|
||||
fieldsInOrder := [...]string{"id", "name", "description", "category", "state"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -27556,13 +27474,6 @@ func (ec *executionContext) unmarshalInputUpdateMesureInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
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 {
|
||||
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":
|
||||
field := field
|
||||
|
||||
@@ -35733,35 +35639,6 @@ func (ec *executionContext) marshalNMesureEdge2ᚖgithubᚗcomᚋgetproboᚋprob
|
||||
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) {
|
||||
tmp, err := graphql.UnmarshalString(v)
|
||||
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
|
||||
}
|
||||
|
||||
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) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
|
||||
@@ -50,7 +50,6 @@ func NewMesure(c *coredata.Mesure) *Mesure {
|
||||
Name: c.Name,
|
||||
Description: c.Description,
|
||||
State: c.State,
|
||||
Importance: c.Importance,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
}
|
||||
|
||||
@@ -128,11 +128,10 @@ type CreateFrameworkPayload struct {
|
||||
}
|
||||
|
||||
type CreateMesureInput struct {
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
Importance coredata.MesureImportance `json:"importance"`
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
}
|
||||
|
||||
type CreateMesurePayload struct {
|
||||
@@ -456,17 +455,16 @@ type InviteUserPayload struct {
|
||||
}
|
||||
|
||||
type Mesure struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Category string `json:"category"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
State coredata.MesureState `json:"state"`
|
||||
Importance coredata.MesureImportance `json:"importance"`
|
||||
Tasks *TaskConnection `json:"tasks"`
|
||||
Risks *RiskConnection `json:"risks"`
|
||||
Controls *ControlConnection `json:"controls"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ID gid.GID `json:"id"`
|
||||
Category string `json:"category"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
State coredata.MesureState `json:"state"`
|
||||
Tasks *TaskConnection `json:"tasks"`
|
||||
Risks *RiskConnection `json:"risks"`
|
||||
Controls *ControlConnection `json:"controls"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (Mesure) IsNode() {}
|
||||
@@ -680,12 +678,11 @@ type UpdateFrameworkPayload struct {
|
||||
}
|
||||
|
||||
type UpdateMesureInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
State *coredata.MesureState `json:"state,omitempty"`
|
||||
Importance *coredata.MesureImportance `json:"importance,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
State *coredata.MesureState `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateMesurePayload struct {
|
||||
|
||||
@@ -539,7 +539,6 @@ func (r *mutationResolver) CreateMesure(ctx context.Context, input types.CreateM
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
Category: input.Category,
|
||||
Importance: input.Importance,
|
||||
})
|
||||
if err != nil {
|
||||
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,
|
||||
Description: input.Description,
|
||||
Category: input.Category,
|
||||
Importance: input.Importance,
|
||||
State: input.State,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user