@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
Fix typo `mesure` instead of `measure`
|
||||
|
||||
## [0.18.0] - 2025-04-30
|
||||
|
||||
### Added
|
||||
|
||||
@@ -134,10 +134,10 @@ export function NavMain() {
|
||||
function getNavItems(organizationId?: string): NavItem[] {
|
||||
return [
|
||||
{
|
||||
title: "Mesures",
|
||||
title: "Measures",
|
||||
icon: ClipboardList,
|
||||
url: organizationId
|
||||
? `/organizations/${organizationId}/mesures`
|
||||
? `/organizations/${organizationId}/measures`
|
||||
: undefined,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ const SidebarProvider = React.forwardRef<
|
||||
const [openMobile, setOpenMobile] = React.useState(false);
|
||||
|
||||
// This is the internal state of the sidebar.
|
||||
// We use openProp and setOpenProp for mesure from outside the component.
|
||||
// We use openProp and setOpenProp for measure from outside the component.
|
||||
const [_open, _setOpen] = React.useState(defaultOpen);
|
||||
const open = openProp ?? _open;
|
||||
const setOpen = React.useCallback(
|
||||
|
||||
@@ -2,5 +2,5 @@ import { Navigate, useParams } from "react-router";
|
||||
|
||||
export default function HomePage() {
|
||||
const { organizationId } = useParams();
|
||||
return <Navigate to={`/organizations/${organizationId}/mesures`} />;
|
||||
return <Navigate to={`/organizations/${organizationId}/measures`} />;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import { OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery } from "./__generat
|
||||
import { OrganizationBreadcrumbBreadcrumbPolicyOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbPolicyOverviewQuery.graphql";
|
||||
import { OrganizationBreadcrumbBreadcrumbVendorOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbVendorOverviewQuery.graphql";
|
||||
import { OrganizationBreadcrumbOrganizationQuery } from "./__generated__/OrganizationBreadcrumbOrganizationQuery.graphql";
|
||||
import { OrganizationBreadcrumbBreadcrumbMesureViewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbMesureViewQuery.graphql";
|
||||
import { OrganizationBreadcrumbBreadcrumbMeasureViewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbMeasureViewQuery.graphql";
|
||||
import { OrganizationBreadcrumbBreadcrumbControlQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbControlQuery.graphql";
|
||||
import { OrganizationBreadcrumbBreadcrumbRiskShowQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbRiskShowQuery.graphql";
|
||||
import ErrorBoundary from "@/components/ErrorBoundary";
|
||||
@@ -314,15 +314,15 @@ function BreadcrumbPolicyOverview() {
|
||||
);
|
||||
}
|
||||
|
||||
function BreadcrumbMesureList() {
|
||||
function BreadcrumbMeasureList() {
|
||||
const { organizationId } = useParams();
|
||||
|
||||
return (
|
||||
<>
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbNavLink to={`/organizations/${organizationId}/mesures`}>
|
||||
Mesures
|
||||
<BreadcrumbNavLink to={`/organizations/${organizationId}/measures`}>
|
||||
Measures
|
||||
</BreadcrumbNavLink>
|
||||
</BreadcrumbItem>
|
||||
<Outlet />
|
||||
@@ -330,22 +330,22 @@ function BreadcrumbMesureList() {
|
||||
);
|
||||
}
|
||||
|
||||
function BreadcrumbMesureView() {
|
||||
const { organizationId, mesureId } = useParams();
|
||||
function BreadcrumbMeasureView() {
|
||||
const { organizationId, measureId } = useParams();
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationBreadcrumbBreadcrumbMesureViewQuery>(
|
||||
useLazyLoadQuery<OrganizationBreadcrumbBreadcrumbMeasureViewQuery>(
|
||||
graphql`
|
||||
query OrganizationBreadcrumbBreadcrumbMesureViewQuery($mesureId: ID!) {
|
||||
mesure: node(id: $mesureId) {
|
||||
query OrganizationBreadcrumbBreadcrumbMeasureViewQuery($measureId: ID!) {
|
||||
measure: node(id: $measureId) {
|
||||
id
|
||||
... on Mesure {
|
||||
... on Measure {
|
||||
name
|
||||
category
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ mesureId: mesureId! }
|
||||
{ measureId: measureId! }
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -353,17 +353,17 @@ function BreadcrumbMesureView() {
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbNavLink
|
||||
to={`/organizations/${organizationId}/mesures#${data.mesure.category}`}
|
||||
to={`/organizations/${organizationId}/measures#${data.measure.category}`}
|
||||
>
|
||||
{data.mesure.category}
|
||||
{data.measure.category}
|
||||
</BreadcrumbNavLink>
|
||||
</BreadcrumbItem>
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbNavLink
|
||||
to={`/organizations/${organizationId}/mesures/${mesureId}`}
|
||||
to={`/organizations/${organizationId}/measures/${measureId}`}
|
||||
>
|
||||
{data.mesure.name}
|
||||
{data.measure.name}
|
||||
</BreadcrumbNavLink>
|
||||
</BreadcrumbItem>
|
||||
<Outlet />
|
||||
@@ -461,13 +461,13 @@ export function BreadCrumb() {
|
||||
</ErrorBoundary>
|
||||
}
|
||||
>
|
||||
<Route path="mesures" element={<BreadcrumbMesureList />}>
|
||||
<Route path="measures" element={<BreadcrumbMeasureList />}>
|
||||
<Route path="new" element={<New />} />
|
||||
<Route
|
||||
path=":mesureId"
|
||||
path=":measureId"
|
||||
element={
|
||||
<Suspense>
|
||||
<BreadcrumbMesureView />
|
||||
<BreadcrumbMeasureView />
|
||||
</Suspense>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -11,10 +11,10 @@ import { FrameworkListPage } from "./frameworks/FrameworkListPage";
|
||||
import { FrameworkPage } from "./frameworks/FrameworkPage";
|
||||
import { NewFrameworkPage } from "./frameworks/NewFrameworkPage";
|
||||
import { ControlPage } from "./frameworks/controls/ControlPage";
|
||||
import { EditMesurePage } from "./mesures/EditMesurePage";
|
||||
import { MesureListPage } from "./mesures/MesureListPage";
|
||||
import { MesurePage } from "./mesures/MesurePage";
|
||||
import { NewMesurePage } from "./mesures/NewMesurePage";
|
||||
import { EditMeasurePage } from "./measures/EditMeasurePage";
|
||||
import { MeasureListPage } from "./measures/MeasureListPage";
|
||||
import { MeasurePage } from "./measures/MeasurePage";
|
||||
import { NewMeasurePage } from "./measures/NewMeasurePage";
|
||||
import { NewPeoplePage } from "./people/NewPeoplePage";
|
||||
import { PeopleListPage } from "./people/PeopleListPage";
|
||||
import { PeoplePage } from "./people/PeoplePage";
|
||||
@@ -47,10 +47,10 @@ export function OrganizationsRoutes() {
|
||||
<Route path="edit" element={<EditFrameworkPage />} />
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Route>
|
||||
<Route path="mesures" element={<MesureListPage />} />
|
||||
<Route path="mesures/new" element={<NewMesurePage />} />
|
||||
<Route path="mesures/:mesureId" element={<MesurePage />} />
|
||||
<Route path="mesures/:mesureId/edit" element={<EditMesurePage />} />
|
||||
<Route path="measures" element={<MeasureListPage />} />
|
||||
<Route path="measures/new" element={<NewMeasurePage />} />
|
||||
<Route path="measures/:measureId" element={<MeasurePage />} />
|
||||
<Route path="measures/:measureId/edit" element={<EditMeasurePage />} />
|
||||
<Route path="vendors/:vendorId" element={<VendorPage />} />
|
||||
<Route path="policies" element={<PolicyListPage />} />
|
||||
<Route path="policies/:policyId" element={<ShowPolicyPage />} />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<a8e66e7606187f54d173cddac8bcd316>>
|
||||
* @generated SignedSource<<e85f30bc133288dc152ea3f46ced461e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,19 +9,19 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type OrganizationBreadcrumbBreadcrumbMesureViewQuery$variables = {
|
||||
mesureId: string;
|
||||
export type OrganizationBreadcrumbBreadcrumbMeasureViewQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type OrganizationBreadcrumbBreadcrumbMesureViewQuery$data = {
|
||||
readonly mesure: {
|
||||
export type OrganizationBreadcrumbBreadcrumbMeasureViewQuery$data = {
|
||||
readonly measure: {
|
||||
readonly category?: string;
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type OrganizationBreadcrumbBreadcrumbMesureViewQuery = {
|
||||
response: OrganizationBreadcrumbBreadcrumbMesureViewQuery$data;
|
||||
variables: OrganizationBreadcrumbBreadcrumbMesureViewQuery$variables;
|
||||
export type OrganizationBreadcrumbBreadcrumbMeasureViewQuery = {
|
||||
response: OrganizationBreadcrumbBreadcrumbMeasureViewQuery$data;
|
||||
variables: OrganizationBreadcrumbBreadcrumbMeasureViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -29,14 +29,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "mesureId"
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "mesureId"
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -64,7 +64,7 @@ v3 = {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
};
|
||||
return {
|
||||
@@ -72,10 +72,10 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "OrganizationBreadcrumbBreadcrumbMesureViewQuery",
|
||||
"name": "OrganizationBreadcrumbBreadcrumbMeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -95,10 +95,10 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "OrganizationBreadcrumbBreadcrumbMesureViewQuery",
|
||||
"name": "OrganizationBreadcrumbBreadcrumbMeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -120,16 +120,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f6183e3013438a1cff8e91c6ff80f452",
|
||||
"cacheID": "3c48e17cf1b1191df67348c4b3fd09e4",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "OrganizationBreadcrumbBreadcrumbMesureViewQuery",
|
||||
"name": "OrganizationBreadcrumbBreadcrumbMeasureViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query OrganizationBreadcrumbBreadcrumbMesureViewQuery(\n $mesureId: ID!\n) {\n mesure: node(id: $mesureId) {\n __typename\n id\n ... on Mesure {\n name\n category\n }\n }\n}\n"
|
||||
"text": "query OrganizationBreadcrumbBreadcrumbMeasureViewQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\n name\n category\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "67fd3d426bbfcbe90457c3033dade1b3";
|
||||
(node as any).hash = "41cebf479daa730843b47f2f9fb46a10";
|
||||
|
||||
export default node;
|
||||
@@ -10,7 +10,7 @@ export function NewFrameworkViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Create Framework"
|
||||
description="Create a new framework to organize your mesures"
|
||||
description="Create a new framework to organize your measures"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-subtle-bg rounded-xl animate-pulse" />
|
||||
</PageTemplateSkeleton>
|
||||
|
||||
@@ -170,7 +170,7 @@ function NewFrameworkViewContent() {
|
||||
return (
|
||||
<PageTemplate
|
||||
title="Create Framework"
|
||||
description="Create a new framework to organize your mesures"
|
||||
description="Create a new framework to organize your measures"
|
||||
>
|
||||
<Card className="max-w-2xl">
|
||||
<form onSubmit={handleSubmit} className="p-6 space-y-6">
|
||||
|
||||
@@ -26,13 +26,13 @@ import {
|
||||
} from "react-relay";
|
||||
import { useParams, Link } from "react-router";
|
||||
import {
|
||||
ControlLinkedMesuresQuery$data,
|
||||
ControlLinkedMesuresQuery,
|
||||
} from "./__generated__/ControlLinkedMesuresQuery.graphql";
|
||||
ControlLinkedMeasuresQuery$data,
|
||||
ControlLinkedMeasuresQuery,
|
||||
} from "./__generated__/ControlLinkedMeasuresQuery.graphql";
|
||||
import {
|
||||
ControlOrganizationMesuresQuery$data,
|
||||
ControlOrganizationMesuresQuery,
|
||||
} from "./__generated__/ControlOrganizationMesuresQuery.graphql";
|
||||
ControlOrganizationMeasuresQuery$data,
|
||||
ControlOrganizationMeasuresQuery,
|
||||
} from "./__generated__/ControlOrganizationMeasuresQuery.graphql";
|
||||
import { ControlFragment_Control$key } from "./__generated__/ControlFragment_Control.graphql";
|
||||
import {
|
||||
ControlLinkedPoliciesQuery$data,
|
||||
@@ -52,13 +52,13 @@ const controlFragment = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
// New query to fetch linked mesures
|
||||
const linkedMesuresQuery = graphql`
|
||||
query ControlLinkedMesuresQuery($controlId: ID!) {
|
||||
// New query to fetch linked measures
|
||||
const linkedMeasuresQuery = graphql`
|
||||
query ControlLinkedMeasuresQuery($controlId: ID!) {
|
||||
control: node(id: $controlId) {
|
||||
id
|
||||
... on Control {
|
||||
mesures(first: 100) @connection(key: "Control__mesures") {
|
||||
measures(first: 100) @connection(key: "Control__measures") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -74,13 +74,13 @@ const linkedMesuresQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
// Query to fetch all mesures for the organization
|
||||
const organizationMesuresQuery = graphql`
|
||||
query ControlOrganizationMesuresQuery($organizationId: ID!) {
|
||||
// Query to fetch all measures for the organization
|
||||
const organizationMeasuresQuery = graphql`
|
||||
query ControlOrganizationMeasuresQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
id
|
||||
... on Organization {
|
||||
mesures(first: 100) @connection(key: "Organization__mesures") {
|
||||
measures(first: 100) @connection(key: "Organization__measures") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -150,23 +150,23 @@ const organizationPoliciesQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
// Mutation to create a mapping between a control and a mesure
|
||||
const createMesureMappingMutation = graphql`
|
||||
mutation ControlCreateMesureMappingMutation(
|
||||
$input: CreateControlMesureMappingInput!
|
||||
// Mutation to create a mapping between a control and a measure
|
||||
const createMeasureMappingMutation = graphql`
|
||||
mutation ControlCreateMeasureMappingMutation(
|
||||
$input: CreateControlMeasureMappingInput!
|
||||
) {
|
||||
createControlMesureMapping(input: $input) {
|
||||
createControlMeasureMapping(input: $input) {
|
||||
success
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// Mutation to delete a mapping between a control and a mesure
|
||||
const deleteMesureMappingMutation = graphql`
|
||||
mutation ControlDeleteMesureMappingMutation(
|
||||
$input: DeleteControlMesureMappingInput!
|
||||
// Mutation to delete a mapping between a control and a measure
|
||||
const deleteMeasureMappingMutation = graphql`
|
||||
mutation ControlDeleteMeasureMappingMutation(
|
||||
$input: DeleteControlMeasureMappingInput!
|
||||
) {
|
||||
deleteControlMesureMapping(input: $input) {
|
||||
deleteControlMeasureMapping(input: $input) {
|
||||
success
|
||||
}
|
||||
}
|
||||
@@ -207,17 +207,17 @@ export function Control({
|
||||
const { toast } = useToast();
|
||||
const environment = useRelayEnvironment();
|
||||
|
||||
// State for mesure mapping
|
||||
const [isMesureMappingDialogOpen, setIsMesureMappingDialogOpen] =
|
||||
// State for measure mapping
|
||||
const [isMeasureMappingDialogOpen, setIsMeasureMappingDialogOpen] =
|
||||
useState(false);
|
||||
const [linkedMesuresData, setLinkedMesuresData] =
|
||||
useState<ControlLinkedMesuresQuery$data | null>(null);
|
||||
const [organizationMesuresData, setOrganizationMesuresData] =
|
||||
useState<ControlOrganizationMesuresQuery$data | null>(null);
|
||||
const [mesureSearchQuery, setMesureSearchQuery] = useState("");
|
||||
const [isLoadingMesures, setIsLoadingMesures] = useState(false);
|
||||
const [isLinkingMesure, setIsLinkingMesure] = useState(false);
|
||||
const [isUnlinkingMesure, setIsUnlinkingMesure] = useState(false);
|
||||
const [linkedMeasuresData, setLinkedMeasuresData] =
|
||||
useState<ControlLinkedMeasuresQuery$data | null>(null);
|
||||
const [organizationMeasuresData, setOrganizationMeasuresData] =
|
||||
useState<ControlOrganizationMeasuresQuery$data | null>(null);
|
||||
const [measureSearchQuery, setMeasureSearchQuery] = useState("");
|
||||
const [isLoadingMeasures, setIsLoadingMeasures] = useState(false);
|
||||
const [isLinkingMeasure, setIsLinkingMeasure] = useState(false);
|
||||
const [isUnlinkingMeasure, setIsUnlinkingMeasure] = useState(false);
|
||||
const [categoryFilter, setCategoryFilter] = useState<string | null>(null);
|
||||
|
||||
// Policy state
|
||||
@@ -233,73 +233,73 @@ export function Control({
|
||||
const [isUnlinkingPolicy, setIsUnlinkingPolicy] = useState(false);
|
||||
|
||||
// Create mutation hooks
|
||||
const [commitCreateMesureMapping] = useMutation(createMesureMappingMutation);
|
||||
const [commitDeleteMesureMapping] = useMutation(deleteMesureMappingMutation);
|
||||
const [commitCreateMeasureMapping] = useMutation(createMeasureMappingMutation);
|
||||
const [commitDeleteMeasureMapping] = useMutation(deleteMeasureMappingMutation);
|
||||
const [commitCreatePolicyMapping] = useMutation(createPolicyMappingMutation);
|
||||
const [commitDeletePolicyMapping] = useMutation(deletePolicyMappingMutation);
|
||||
|
||||
// Load initial linked mesures data
|
||||
// Load initial linked measures data
|
||||
useEffect(() => {
|
||||
if (control.id) {
|
||||
setIsLoadingMesures(true);
|
||||
fetchQuery<ControlLinkedMesuresQuery>(environment, linkedMesuresQuery, {
|
||||
setIsLoadingMeasures(true);
|
||||
fetchQuery<ControlLinkedMeasuresQuery>(environment, linkedMeasuresQuery, {
|
||||
controlId: control.id,
|
||||
}).subscribe({
|
||||
next: (data) => {
|
||||
setLinkedMesuresData(data);
|
||||
setIsLoadingMesures(false);
|
||||
setLinkedMeasuresData(data);
|
||||
setIsLoadingMeasures(false);
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error loading initial mesures:", error);
|
||||
setIsLoadingMesures(false);
|
||||
console.error("Error loading initial measures:", error);
|
||||
setIsLoadingMeasures(false);
|
||||
},
|
||||
});
|
||||
}
|
||||
}, [control.id, environment]);
|
||||
|
||||
// Load mesures data
|
||||
const loadMesuresData = useCallback(() => {
|
||||
// Load measures data
|
||||
const loadMeasuresData = useCallback(() => {
|
||||
if (!organizationId || !control.id) return;
|
||||
|
||||
setIsLoadingMesures(true);
|
||||
setIsLoadingMeasures(true);
|
||||
|
||||
// Fetch all mesures for the organization
|
||||
fetchQuery<ControlOrganizationMesuresQuery>(
|
||||
// Fetch all measures for the organization
|
||||
fetchQuery<ControlOrganizationMeasuresQuery>(
|
||||
environment,
|
||||
organizationMesuresQuery,
|
||||
organizationMeasuresQuery,
|
||||
{
|
||||
organizationId,
|
||||
}
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
setOrganizationMesuresData(data);
|
||||
setOrganizationMeasuresData(data);
|
||||
},
|
||||
complete: () => {
|
||||
// Fetch linked mesures for this control
|
||||
fetchQuery<ControlLinkedMesuresQuery>(environment, linkedMesuresQuery, {
|
||||
// Fetch linked measures for this control
|
||||
fetchQuery<ControlLinkedMeasuresQuery>(environment, linkedMeasuresQuery, {
|
||||
controlId: control.id,
|
||||
}).subscribe({
|
||||
next: (data) => {
|
||||
setLinkedMesuresData(data);
|
||||
setIsLoadingMesures(false);
|
||||
setLinkedMeasuresData(data);
|
||||
setIsLoadingMeasures(false);
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error fetching linked mesures:", error);
|
||||
setIsLoadingMesures(false);
|
||||
console.error("Error fetching linked measures:", error);
|
||||
setIsLoadingMeasures(false);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to load linked mesures.",
|
||||
description: "Failed to load linked measures.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error fetching organization mesures:", error);
|
||||
setIsLoadingMesures(false);
|
||||
console.error("Error fetching organization measures:", error);
|
||||
setIsLoadingMeasures(false);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to load mesures.",
|
||||
description: "Failed to load measures.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
@@ -307,190 +307,190 @@ export function Control({
|
||||
}, [control.id, environment, organizationId, toast]);
|
||||
|
||||
// Helper functions
|
||||
const getMesures = useCallback(() => {
|
||||
if (!organizationMesuresData?.organization?.mesures?.edges) return [];
|
||||
return organizationMesuresData.organization.mesures.edges.map(
|
||||
const getMeasures = useCallback(() => {
|
||||
if (!organizationMeasuresData?.organization?.measures?.edges) return [];
|
||||
return organizationMeasuresData.organization.measures.edges.map(
|
||||
(edge) => edge.node
|
||||
);
|
||||
}, [organizationMesuresData]);
|
||||
}, [organizationMeasuresData]);
|
||||
|
||||
const getLinkedMesures = useCallback(() => {
|
||||
if (!linkedMesuresData?.control?.mesures?.edges) return [];
|
||||
return linkedMesuresData.control.mesures.edges.map((edge) => edge.node);
|
||||
}, [linkedMesuresData]);
|
||||
const getLinkedMeasures = useCallback(() => {
|
||||
if (!linkedMeasuresData?.control?.measures?.edges) return [];
|
||||
return linkedMeasuresData.control.measures.edges.map((edge) => edge.node);
|
||||
}, [linkedMeasuresData]);
|
||||
|
||||
const isMesureLinked = useCallback(
|
||||
(mesureId: string) => {
|
||||
const linkedMesures = getLinkedMesures();
|
||||
return linkedMesures.some((mesure) => mesure.id === mesureId);
|
||||
const isMeasureLinked = useCallback(
|
||||
(measureId: string) => {
|
||||
const linkedMeasures = getLinkedMeasures();
|
||||
return linkedMeasures.some((measure) => measure.id === measureId);
|
||||
},
|
||||
[getLinkedMesures]
|
||||
[getLinkedMeasures]
|
||||
);
|
||||
|
||||
const getMesureCategories = useCallback(() => {
|
||||
const mesures = getMesures();
|
||||
const getMeasureCategories = useCallback(() => {
|
||||
const measures = getMeasures();
|
||||
const categories = new Set<string>();
|
||||
|
||||
mesures.forEach((mesure) => {
|
||||
if (mesure.category) {
|
||||
categories.add(mesure.category);
|
||||
measures.forEach((measure) => {
|
||||
if (measure.category) {
|
||||
categories.add(measure.category);
|
||||
}
|
||||
});
|
||||
|
||||
return Array.from(categories).sort();
|
||||
}, [getMesures]);
|
||||
}, [getMeasures]);
|
||||
|
||||
const filteredMesures = useCallback(() => {
|
||||
const mesures = getMesures();
|
||||
if (!mesureSearchQuery && !categoryFilter) return mesures;
|
||||
const filteredMeasures = useCallback(() => {
|
||||
const measures = getMeasures();
|
||||
if (!measureSearchQuery && !categoryFilter) return measures;
|
||||
|
||||
return mesures.filter((mesure) => {
|
||||
return measures.filter((measure) => {
|
||||
// Filter by search query
|
||||
const matchesSearch =
|
||||
!mesureSearchQuery ||
|
||||
mesure.name.toLowerCase().includes(mesureSearchQuery.toLowerCase()) ||
|
||||
(mesure.description &&
|
||||
mesure.description
|
||||
!measureSearchQuery ||
|
||||
measure.name.toLowerCase().includes(measureSearchQuery.toLowerCase()) ||
|
||||
(measure.description &&
|
||||
measure.description
|
||||
.toLowerCase()
|
||||
.includes(mesureSearchQuery.toLowerCase()));
|
||||
.includes(measureSearchQuery.toLowerCase()));
|
||||
|
||||
// Filter by category
|
||||
const matchesCategory =
|
||||
!categoryFilter ||
|
||||
categoryFilter === "all" ||
|
||||
mesure.category === categoryFilter;
|
||||
measure.category === categoryFilter;
|
||||
|
||||
return matchesSearch && matchesCategory;
|
||||
});
|
||||
}, [categoryFilter, getMesures, mesureSearchQuery]);
|
||||
}, [categoryFilter, getMeasures, measureSearchQuery]);
|
||||
|
||||
// Handle link/unlink functions
|
||||
const handleLinkMesure = useCallback(
|
||||
(mesureId: string) => {
|
||||
const handleLinkMeasure = useCallback(
|
||||
(measureId: string) => {
|
||||
if (!control.id) return;
|
||||
|
||||
setIsLinkingMesure(true);
|
||||
setIsLinkingMeasure(true);
|
||||
|
||||
commitCreateMesureMapping({
|
||||
commitCreateMeasureMapping({
|
||||
variables: {
|
||||
input: {
|
||||
controlId: control.id,
|
||||
mesureId: mesureId,
|
||||
measureId: measureId,
|
||||
},
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
setIsLinkingMesure(false);
|
||||
setIsLinkingMeasure(false);
|
||||
|
||||
if (errors) {
|
||||
console.error("Error linking mesure:", errors);
|
||||
console.error("Error linking measure:", errors);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to link mesure. Please try again.",
|
||||
description: "Failed to link measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Refresh linked mesures data
|
||||
fetchQuery<ControlLinkedMesuresQuery>(
|
||||
// Refresh linked measures data
|
||||
fetchQuery<ControlLinkedMeasuresQuery>(
|
||||
environment,
|
||||
linkedMesuresQuery,
|
||||
linkedMeasuresQuery,
|
||||
{
|
||||
controlId: control.id,
|
||||
}
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
setLinkedMesuresData(data);
|
||||
setLinkedMeasuresData(data);
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error refreshing linked mesures:", error);
|
||||
console.error("Error refreshing linked measures:", error);
|
||||
},
|
||||
});
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Mesure successfully linked to control.",
|
||||
description: "Measure successfully linked to control.",
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
setIsLinkingMesure(false);
|
||||
console.error("Error linking mesure:", error);
|
||||
setIsLinkingMeasure(false);
|
||||
console.error("Error linking measure:", error);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to link mesure. Please try again.",
|
||||
description: "Failed to link measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
[commitCreateMesureMapping, control.id, environment, toast]
|
||||
[commitCreateMeasureMapping, control.id, environment, toast]
|
||||
);
|
||||
|
||||
const handleUnlinkMesure = useCallback(
|
||||
(mesureId: string) => {
|
||||
const handleUnlinkMeasure = useCallback(
|
||||
(measureId: string) => {
|
||||
if (!control.id) return;
|
||||
|
||||
setIsUnlinkingMesure(true);
|
||||
setIsUnlinkingMeasure(true);
|
||||
|
||||
commitDeleteMesureMapping({
|
||||
commitDeleteMeasureMapping({
|
||||
variables: {
|
||||
input: {
|
||||
controlId: control.id,
|
||||
mesureId: mesureId,
|
||||
measureId: measureId,
|
||||
},
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
setIsUnlinkingMesure(false);
|
||||
setIsUnlinkingMeasure(false);
|
||||
|
||||
if (errors) {
|
||||
console.error("Error unlinking mesure:", errors);
|
||||
console.error("Error unlinking measure:", errors);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to unlink mesure. Please try again.",
|
||||
description: "Failed to unlink measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Refresh linked mesures data
|
||||
fetchQuery<ControlLinkedMesuresQuery>(
|
||||
// Refresh linked measures data
|
||||
fetchQuery<ControlLinkedMeasuresQuery>(
|
||||
environment,
|
||||
linkedMesuresQuery,
|
||||
linkedMeasuresQuery,
|
||||
{
|
||||
controlId: control.id,
|
||||
}
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
setLinkedMesuresData(data);
|
||||
setLinkedMeasuresData(data);
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error refreshing linked mesures:", error);
|
||||
console.error("Error refreshing linked measures:", error);
|
||||
},
|
||||
});
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Mesure successfully unlinked from control.",
|
||||
description: "Measure successfully unlinked from control.",
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
setIsUnlinkingMesure(false);
|
||||
console.error("Error unlinking mesure:", error);
|
||||
setIsUnlinkingMeasure(false);
|
||||
console.error("Error unlinking measure:", error);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to unlink mesure. Please try again.",
|
||||
description: "Failed to unlink measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
[commitDeleteMesureMapping, control.id, environment, toast]
|
||||
[commitDeleteMeasureMapping, control.id, environment, toast]
|
||||
);
|
||||
|
||||
const handleOpenMesureMappingDialog = useCallback(() => {
|
||||
loadMesuresData();
|
||||
setIsMesureMappingDialogOpen(true);
|
||||
}, [loadMesuresData]);
|
||||
const handleOpenMeasureMappingDialog = useCallback(() => {
|
||||
loadMeasuresData();
|
||||
setIsMeasureMappingDialogOpen(true);
|
||||
}, [loadMeasuresData]);
|
||||
|
||||
// Load initial linked policies data
|
||||
useEffect(() => {
|
||||
@@ -778,10 +778,10 @@ export function Control({
|
||||
|
||||
{/* Security Measures Section */}
|
||||
<div className="mt-8">
|
||||
{/* Mesure Mapping Dialog */}
|
||||
{/* Measure Mapping Dialog */}
|
||||
<Dialog
|
||||
open={isMesureMappingDialogOpen}
|
||||
onOpenChange={setIsMesureMappingDialogOpen}
|
||||
open={isMeasureMappingDialogOpen}
|
||||
onOpenChange={setIsMeasureMappingDialogOpen}
|
||||
>
|
||||
<DialogContent className="max-w-3xl max-h-[80vh] overflow-hidden flex flex-col">
|
||||
<DialogHeader>
|
||||
@@ -798,8 +798,8 @@ export function Control({
|
||||
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-tertiary" />
|
||||
<Input
|
||||
placeholder="Search security measures by name or description..."
|
||||
value={mesureSearchQuery}
|
||||
onChange={(e) => setMesureSearchQuery(e.target.value)}
|
||||
value={measureSearchQuery}
|
||||
onChange={(e) => setMeasureSearchQuery(e.target.value)}
|
||||
className="w-full pl-10"
|
||||
/>
|
||||
</div>
|
||||
@@ -816,7 +816,7 @@ export function Control({
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="all">All categories</SelectItem>
|
||||
{getMesureCategories().map((category) => (
|
||||
{getMeasureCategories().map((category) => (
|
||||
<SelectItem key={category} value={category}>
|
||||
{category}
|
||||
</SelectItem>
|
||||
@@ -827,14 +827,14 @@ export function Control({
|
||||
</div>
|
||||
|
||||
<div className="flex-1 overflow-hidden">
|
||||
{isLoadingMesures ? (
|
||||
{isLoadingMeasures ? (
|
||||
<div className="flex items-center justify-center h-full">
|
||||
<Loader2 className="w-8 h-8 animate-spin text-info" />
|
||||
<span className="ml-2">Loading security measures...</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="max-h-[50vh] overflow-y-auto pr-2">
|
||||
{filteredMesures().length === 0 ? (
|
||||
{filteredMeasures().length === 0 ? (
|
||||
<div className="text-center py-8 text-secondary">
|
||||
No security measures found. Try adjusting your search or
|
||||
select a different category.
|
||||
@@ -851,30 +851,30 @@ export function Control({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{filteredMesures().map((mesure) => {
|
||||
const isLinked = isMesureLinked(mesure.id);
|
||||
{filteredMeasures().map((measure) => {
|
||||
const isLinked = isMeasureLinked(measure.id);
|
||||
return (
|
||||
<tr
|
||||
key={mesure.id}
|
||||
key={measure.id}
|
||||
className="border-b hover:bg-invert-bg"
|
||||
>
|
||||
<td className="py-3 px-4">
|
||||
<div className="font-medium">
|
||||
{mesure.name}
|
||||
{measure.name}
|
||||
</div>
|
||||
{mesure.description && (
|
||||
{measure.description && (
|
||||
<div className="text-xs text-secondary line-clamp-1 mt-0.5">
|
||||
{mesure.description}
|
||||
{measure.description}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
<td className="py-3 px-4">
|
||||
<div
|
||||
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
||||
mesure.state
|
||||
measure.state
|
||||
)} inline-block`}
|
||||
>
|
||||
{formatState(mesure.state)}
|
||||
{formatState(measure.state)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="py-3 px-4 text-right whitespace-nowrap">
|
||||
@@ -883,12 +883,12 @@ export function Control({
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() =>
|
||||
handleUnlinkMesure(mesure.id)
|
||||
handleUnlinkMeasure(measure.id)
|
||||
}
|
||||
disabled={isUnlinkingMesure}
|
||||
disabled={isUnlinkingMeasure}
|
||||
className="text-xs h-7 text-danger border-danger-b hover:bg-h-danger-bg"
|
||||
>
|
||||
{isUnlinkingMesure ? (
|
||||
{isUnlinkingMeasure ? (
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
) : (
|
||||
<X className="w-4 h-4" />
|
||||
@@ -900,12 +900,12 @@ export function Control({
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
onClick={() =>
|
||||
handleLinkMesure(mesure.id)
|
||||
handleLinkMeasure(measure.id)
|
||||
}
|
||||
disabled={isLinkingMesure}
|
||||
disabled={isLinkingMeasure}
|
||||
className="text-xs h-7 text-info border-info-b hover:bg-h-info-bg"
|
||||
>
|
||||
{isLinkingMesure ? (
|
||||
{isLinkingMeasure ? (
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
) : (
|
||||
<LinkIcon className="w-4 h-4" />
|
||||
@@ -925,14 +925,14 @@ export function Control({
|
||||
</div>
|
||||
|
||||
<DialogFooter className="mt-4">
|
||||
<Button onClick={() => setIsMesureMappingDialogOpen(false)}>
|
||||
<Button onClick={() => setIsMeasureMappingDialogOpen(false)}>
|
||||
Close
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
{/* Linked Mesures List */}
|
||||
{/* Linked Measures List */}
|
||||
<div>
|
||||
<div className="flex justify-between items-center mb-4">
|
||||
<h3 className="text-xl font-medium text-secondary">
|
||||
@@ -942,20 +942,20 @@ export function Control({
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="flex items-center gap-1"
|
||||
onClick={handleOpenMesureMappingDialog}
|
||||
onClick={handleOpenMeasureMappingDialog}
|
||||
>
|
||||
<LinkIcon className="w-4 h-4" />
|
||||
<span>Link Security Measures</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{isLoadingMesures ? (
|
||||
{isLoadingMeasures ? (
|
||||
<div className="flex items-center justify-center h-24">
|
||||
<Loader2 className="w-6 h-6 animate-spin text-info" />
|
||||
<span className="ml-2">Loading security measures...</span>
|
||||
</div>
|
||||
) : linkedMesuresData?.control?.mesures?.edges &&
|
||||
linkedMesuresData.control.mesures.edges.length > 0 ? (
|
||||
) : linkedMeasuresData?.control?.measures?.edges &&
|
||||
linkedMeasuresData.control.measures.edges.length > 0 ? (
|
||||
<div className="overflow-x-auto border rounded-md">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
@@ -968,26 +968,26 @@ export function Control({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{getLinkedMesures().map((mesure) => (
|
||||
{getLinkedMeasures().map((measure) => (
|
||||
<tr
|
||||
key={mesure.id}
|
||||
key={measure.id}
|
||||
className="border-b hover:bg-invert-bg"
|
||||
>
|
||||
<td className="py-3 px-4">
|
||||
<div className="font-medium">{mesure.name}</div>
|
||||
{mesure.description && (
|
||||
<div className="font-medium">{measure.name}</div>
|
||||
{measure.description && (
|
||||
<div className="text-xs text-secondary line-clamp-1 mt-0.5">
|
||||
{mesure.description}
|
||||
{measure.description}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
<td className="py-3 px-4">
|
||||
<div
|
||||
className={`px-2 py-0.5 rounded-full text-xs ${getStateColor(
|
||||
mesure.state
|
||||
measure.state
|
||||
)} inline-block`}
|
||||
>
|
||||
{formatState(mesure.state)}
|
||||
{formatState(measure.state)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="py-3 px-4 text-right whitespace-nowrap">
|
||||
@@ -999,7 +999,7 @@ export function Control({
|
||||
className="text-xs h-7"
|
||||
>
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/mesures/${mesure.id}`}
|
||||
to={`/organizations/${organizationId}/measures/${measure.id}`}
|
||||
>
|
||||
View
|
||||
</Link>
|
||||
@@ -1007,8 +1007,8 @@ export function Control({
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handleUnlinkMesure(mesure.id)}
|
||||
disabled={isUnlinkingMesure}
|
||||
onClick={() => handleUnlinkMeasure(measure.id)}
|
||||
disabled={isUnlinkingMeasure}
|
||||
className="text-xs h-7 text-danger border-danger-b hover:bg-h-danger-bg"
|
||||
>
|
||||
Unlink
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<b2d5c0102cdcaff05ca490a75b797625>>
|
||||
* @generated SignedSource<<369cb72e422d254a5e4956d17c47a8ae>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateRiskMesureMappingInput = {
|
||||
mesureId: string;
|
||||
riskId: string;
|
||||
export type CreateControlMeasureMappingInput = {
|
||||
controlId: string;
|
||||
measureId: string;
|
||||
};
|
||||
export type ShowRiskViewCreateRiskMesureMappingMutation$variables = {
|
||||
input: CreateRiskMesureMappingInput;
|
||||
export type ControlCreateMeasureMappingMutation$variables = {
|
||||
input: CreateControlMeasureMappingInput;
|
||||
};
|
||||
export type ShowRiskViewCreateRiskMesureMappingMutation$data = {
|
||||
readonly createRiskMesureMapping: {
|
||||
export type ControlCreateMeasureMappingMutation$data = {
|
||||
readonly createControlMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type ShowRiskViewCreateRiskMesureMappingMutation = {
|
||||
response: ShowRiskViewCreateRiskMesureMappingMutation$data;
|
||||
variables: ShowRiskViewCreateRiskMesureMappingMutation$variables;
|
||||
export type ControlCreateMeasureMappingMutation = {
|
||||
response: ControlCreateMeasureMappingMutation$data;
|
||||
variables: ControlCreateMeasureMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,9 +44,9 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "CreateRiskMesureMappingPayload",
|
||||
"concreteType": "CreateControlMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createRiskMesureMapping",
|
||||
"name": "createControlMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -65,7 +65,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ShowRiskViewCreateRiskMesureMappingMutation",
|
||||
"name": "ControlCreateMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -74,20 +74,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ShowRiskViewCreateRiskMesureMappingMutation",
|
||||
"name": "ControlCreateMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f7d34307825549877c07678c77ca17c6",
|
||||
"cacheID": "5ff3b52a5f40607556617a17e44dc3b1",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ShowRiskViewCreateRiskMesureMappingMutation",
|
||||
"name": "ControlCreateMeasureMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ShowRiskViewCreateRiskMesureMappingMutation(\n $input: CreateRiskMesureMappingInput!\n) {\n createRiskMesureMapping(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation ControlCreateMeasureMappingMutation(\n $input: CreateControlMeasureMappingInput!\n) {\n createControlMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e1d7cdd482d6658c2befddd478a3397d";
|
||||
(node as any).hash = "2c0061b6e180971d0e0f8b8b5c44d566";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0fc791ecc00bfd6b1aa3a8da262df36c>>
|
||||
* @generated SignedSource<<6208e6173d03bbf497b38e0f8dece2a7>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteRiskMesureMappingInput = {
|
||||
mesureId: string;
|
||||
riskId: string;
|
||||
export type DeleteControlMeasureMappingInput = {
|
||||
controlId: string;
|
||||
measureId: string;
|
||||
};
|
||||
export type ShowRiskViewDeleteRiskMesureMappingMutation$variables = {
|
||||
input: DeleteRiskMesureMappingInput;
|
||||
export type ControlDeleteMeasureMappingMutation$variables = {
|
||||
input: DeleteControlMeasureMappingInput;
|
||||
};
|
||||
export type ShowRiskViewDeleteRiskMesureMappingMutation$data = {
|
||||
readonly deleteRiskMesureMapping: {
|
||||
export type ControlDeleteMeasureMappingMutation$data = {
|
||||
readonly deleteControlMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type ShowRiskViewDeleteRiskMesureMappingMutation = {
|
||||
response: ShowRiskViewDeleteRiskMesureMappingMutation$data;
|
||||
variables: ShowRiskViewDeleteRiskMesureMappingMutation$variables;
|
||||
export type ControlDeleteMeasureMappingMutation = {
|
||||
response: ControlDeleteMeasureMappingMutation$data;
|
||||
variables: ControlDeleteMeasureMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,9 +44,9 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "DeleteRiskMesureMappingPayload",
|
||||
"concreteType": "DeleteControlMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteRiskMesureMapping",
|
||||
"name": "deleteControlMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -65,7 +65,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ShowRiskViewDeleteRiskMesureMappingMutation",
|
||||
"name": "ControlDeleteMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -74,20 +74,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ShowRiskViewDeleteRiskMesureMappingMutation",
|
||||
"name": "ControlDeleteMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "d46920306e833fb33b4f10dca6aa1c5a",
|
||||
"cacheID": "446e0d6cc32e0c0dfc4f5e74e11bdb84",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ShowRiskViewDeleteRiskMesureMappingMutation",
|
||||
"name": "ControlDeleteMeasureMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ShowRiskViewDeleteRiskMesureMappingMutation(\n $input: DeleteRiskMesureMappingInput!\n) {\n deleteRiskMesureMapping(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation ControlDeleteMeasureMappingMutation(\n $input: DeleteControlMeasureMappingInput!\n) {\n deleteControlMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e55c8d6490fbcfe0d287053200b6347d";
|
||||
(node as any).hash = "f6a94c260a98dffe7d48e4aa9e690845";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<94f5c5a041ae3730b8f4a71ad63530a8>>
|
||||
* @generated SignedSource<<968e00428300c564a03ee9a4b98eed90>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,29 +9,29 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ControlLinkedMesuresQuery$variables = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ControlLinkedMeasuresQuery$variables = {
|
||||
controlId: string;
|
||||
};
|
||||
export type ControlLinkedMesuresQuery$data = {
|
||||
export type ControlLinkedMeasuresQuery$data = {
|
||||
readonly control: {
|
||||
readonly id: string;
|
||||
readonly mesures?: {
|
||||
readonly measures?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlLinkedMesuresQuery = {
|
||||
response: ControlLinkedMesuresQuery$data;
|
||||
variables: ControlLinkedMesuresQuery$variables;
|
||||
export type ControlLinkedMeasuresQuery = {
|
||||
response: ControlLinkedMeasuresQuery$data;
|
||||
variables: ControlLinkedMeasuresQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -67,7 +67,7 @@ v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -75,7 +75,7 @@ v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -161,7 +161,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlLinkedMesuresQuery",
|
||||
"name": "ControlLinkedMeasuresQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
@@ -176,11 +176,11 @@ return {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesures",
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__Control__mesures_connection",
|
||||
"name": "__Control__measures_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -200,7 +200,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlLinkedMesuresQuery",
|
||||
"name": "ControlLinkedMeasuresQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
@@ -218,21 +218,21 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": "mesures(first:100)"
|
||||
"storageKey": "measures(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "Control__mesures",
|
||||
"key": "Control__measures",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesures"
|
||||
"name": "measures"
|
||||
}
|
||||
],
|
||||
"type": "Control",
|
||||
@@ -244,7 +244,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b29cb1662103fc42abf16fa6b3458a68",
|
||||
"cacheID": "1b64a54214517bf3d4555ada606c7e1c",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -254,18 +254,18 @@ return {
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"control",
|
||||
"mesures"
|
||||
"measures"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "ControlLinkedMesuresQuery",
|
||||
"name": "ControlLinkedMeasuresQuery",
|
||||
"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 state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query ControlLinkedMeasuresQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n measures(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 = "e42a48d7b21eaa5c42331377b6a9bc9c";
|
||||
(node as any).hash = "168cf7c175bd5abf756edada5c8bd533";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<862b2210a9d569a05063cebc805bdd01>>
|
||||
* @generated SignedSource<<b9bcf1b3144ca9e18e7e7c3513dfbd73>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,29 +9,29 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ControlOrganizationMesuresQuery$variables = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ControlOrganizationMeasuresQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type ControlOrganizationMesuresQuery$data = {
|
||||
export type ControlOrganizationMeasuresQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly mesures?: {
|
||||
readonly measures?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlOrganizationMesuresQuery = {
|
||||
response: ControlOrganizationMesuresQuery$data;
|
||||
variables: ControlOrganizationMesuresQuery$variables;
|
||||
export type ControlOrganizationMeasuresQuery = {
|
||||
response: ControlOrganizationMeasuresQuery$data;
|
||||
variables: ControlOrganizationMeasuresQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -67,7 +67,7 @@ v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -75,7 +75,7 @@ v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -161,7 +161,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlOrganizationMesuresQuery",
|
||||
"name": "ControlOrganizationMeasuresQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -176,11 +176,11 @@ return {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesures",
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__Organization__mesures_connection",
|
||||
"name": "__Organization__measures_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -200,7 +200,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlOrganizationMesuresQuery",
|
||||
"name": "ControlOrganizationMeasuresQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -218,21 +218,21 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": "mesures(first:100)"
|
||||
"storageKey": "measures(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "Organization__mesures",
|
||||
"key": "Organization__measures",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesures"
|
||||
"name": "measures"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
@@ -244,7 +244,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "bb1066800bfa28aaa64a2fd1f12c5924",
|
||||
"cacheID": "9d2ddaaceb1b73e3c7b967e2d2a1b86b",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -254,18 +254,18 @@ return {
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"organization",
|
||||
"mesures"
|
||||
"measures"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "ControlOrganizationMesuresQuery",
|
||||
"name": "ControlOrganizationMeasuresQuery",
|
||||
"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 state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query ControlOrganizationMeasuresQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n measures(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 = "5f1d6b11af3d92bec1c4d37ceb12b7c3";
|
||||
(node as any).hash = "6f5efd4dbac9bdc9b32ed8c155edf1e7";
|
||||
|
||||
export default node;
|
||||
@@ -4,26 +4,26 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const NewMesureView = lazy(() => import("./NewMesureView"));
|
||||
const EditMeasureView = lazy(() => import("./EditMeasureView"));
|
||||
|
||||
export function NewMesureViewSkeleton() {
|
||||
export function EditMeasureViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="New Mesure"
|
||||
description="Add a new mesure. You will be able to link it to control and risks"
|
||||
title="Edit Measure"
|
||||
description="Edit a Measure. You will be able to link it to control and risks"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-subtle-bg rounded-xl animate-pulse" />
|
||||
</PageTemplateSkeleton>
|
||||
);
|
||||
}
|
||||
|
||||
export function NewMesurePage() {
|
||||
export function EditMeasurePage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<NewMesureViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<EditMeasureViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<NewMesureView />
|
||||
<EditMeasureView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -9,19 +9,19 @@ import {
|
||||
import { useParams, useNavigate } from "react-router";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { EditMesureViewUpdateMesureMutation } from "./__generated__/EditMesureViewUpdateMesureMutation.graphql";
|
||||
import { EditMeasureViewUpdateMeasureMutation } from "./__generated__/EditMeasureViewUpdateMeasureMutation.graphql";
|
||||
import { EditableField } from "@/components/EditableField";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { EditMesureViewSkeleton } from "./EditMesurePage";
|
||||
import { EditMesureViewQuery } from "./__generated__/EditMesureViewQuery.graphql";
|
||||
import { EditMeasureViewSkeleton } from "./EditMeasurePage";
|
||||
import { EditMeasureViewQuery } from "./__generated__/EditMeasureViewQuery.graphql";
|
||||
|
||||
const editMesureQuery = graphql`
|
||||
query EditMesureViewQuery($mesureId: ID!) {
|
||||
node(id: $mesureId) {
|
||||
... on Mesure {
|
||||
const editMeasureQuery = graphql`
|
||||
query EditMeasureViewQuery($measureId: ID!) {
|
||||
node(id: $measureId) {
|
||||
... on Measure {
|
||||
id
|
||||
name
|
||||
description
|
||||
@@ -31,10 +31,10 @@ const editMesureQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const updateMesureMutation = graphql`
|
||||
mutation EditMesureViewUpdateMesureMutation($input: UpdateMesureInput!) {
|
||||
updateMesure(input: $input) {
|
||||
mesure {
|
||||
const updateMeasureMutation = graphql`
|
||||
mutation EditMeasureViewUpdateMeasureMutation($input: UpdateMeasureInput!) {
|
||||
updateMeasure(input: $input) {
|
||||
measure {
|
||||
id
|
||||
name
|
||||
description
|
||||
@@ -43,26 +43,26 @@ const updateMesureMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
function EditMesureViewContent({
|
||||
function EditMeasureViewContent({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<EditMesureViewQuery>;
|
||||
queryRef: PreloadedQuery<EditMeasureViewQuery>;
|
||||
}) {
|
||||
const { organizationId } = useParams<{
|
||||
organizationId: string;
|
||||
}>();
|
||||
const { mesureId } = useParams();
|
||||
const { measureId } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
const { node: mesure } = usePreloadedQuery(editMesureQuery, queryRef);
|
||||
const { node: measure } = usePreloadedQuery(editMeasureQuery, queryRef);
|
||||
const [formData, setFormData] = useState({
|
||||
name: mesure.name ?? "",
|
||||
description: mesure.description ?? "",
|
||||
category: mesure.category ?? ""
|
||||
name: measure.name ?? "",
|
||||
description: measure.description ?? "",
|
||||
category: measure.category ?? ""
|
||||
});
|
||||
|
||||
const [commit, isInFlight] =
|
||||
useMutation<EditMesureViewUpdateMesureMutation>(updateMesureMutation);
|
||||
useMutation<EditMeasureViewUpdateMeasureMutation>(updateMeasureMutation);
|
||||
|
||||
const handleFieldChange = (field: keyof typeof formData, value: unknown) => {
|
||||
setFormData((prev) => ({
|
||||
@@ -86,7 +86,7 @@ function EditMesureViewContent({
|
||||
commit({
|
||||
variables: {
|
||||
input: {
|
||||
id: mesureId!,
|
||||
id: measureId!,
|
||||
name: formData.name,
|
||||
description: formData.description,
|
||||
category: formData.category
|
||||
@@ -96,7 +96,7 @@ function EditMesureViewContent({
|
||||
if (errors) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: errors[0]?.message || "Failed to update mesure",
|
||||
description: errors[0]?.message || "Failed to update measure",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -104,10 +104,10 @@ function EditMesureViewContent({
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Mesure updated successfully",
|
||||
description: "Measure updated successfully",
|
||||
});
|
||||
|
||||
navigate(`/organizations/${organizationId}/mesures/${mesureId}`);
|
||||
navigate(`/organizations/${organizationId}/measures/${measureId}`);
|
||||
},
|
||||
onError(error) {
|
||||
toast({
|
||||
@@ -121,8 +121,8 @@ function EditMesureViewContent({
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title="Edit Mesure"
|
||||
description="Edit a mesure. You will be able to link it to control and risks"
|
||||
title="Edit Measure"
|
||||
description="Edit a measure. You will be able to link it to control and risks"
|
||||
>
|
||||
<Card className="max-w-2xl">
|
||||
<form onSubmit={handleSubmit} className="p-6 space-y-6">
|
||||
@@ -139,7 +139,7 @@ function EditMesureViewContent({
|
||||
onChange={(value) => handleFieldChange("description", value)}
|
||||
required
|
||||
multiline
|
||||
helpText="Provide a detailed description of the mesure"
|
||||
helpText="Provide a detailed description of the measure"
|
||||
/>
|
||||
|
||||
<EditableField
|
||||
@@ -154,13 +154,13 @@ function EditMesureViewContent({
|
||||
type="button"
|
||||
variant="outline"
|
||||
onClick={() =>
|
||||
navigate(`/organizations/${organizationId}/mesures/${mesureId}`)
|
||||
navigate(`/organizations/${organizationId}/measures/${measureId}`)
|
||||
}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isInFlight}>
|
||||
{isInFlight ? "Updating..." : "Update Mesure"}
|
||||
{isInFlight ? "Updating..." : "Update Measure"}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -169,24 +169,24 @@ function EditMesureViewContent({
|
||||
);
|
||||
}
|
||||
|
||||
export default function EditMesureView() {
|
||||
const { mesureId } = useParams();
|
||||
export default function EditMeasureView() {
|
||||
const { measureId } = useParams();
|
||||
const [queryRef, loadQuery] =
|
||||
useQueryLoader<EditMesureViewQuery>(editMesureQuery);
|
||||
useQueryLoader<EditMeasureViewQuery>(editMeasureQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (mesureId) {
|
||||
loadQuery({ mesureId });
|
||||
if (measureId) {
|
||||
loadQuery({ measureId });
|
||||
}
|
||||
}, [mesureId, loadQuery]);
|
||||
}, [measureId, loadQuery]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <EditMesureViewSkeleton />;
|
||||
return <EditMeasureViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<EditMesureViewSkeleton />}>
|
||||
<EditMesureViewContent queryRef={queryRef} />
|
||||
<Suspense fallback={<EditMeasureViewSkeleton />}>
|
||||
<EditMeasureViewContent queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -4,13 +4,13 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const MesureListView = lazy(() => import("./MesureListView"));
|
||||
const MeasureListView = lazy(() => import("./MeasureListView"));
|
||||
|
||||
export function MesureListViewSkeleton() {
|
||||
export function MeasureListViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Mesures"
|
||||
description="Mesures are actions taken to reduce the risk of a risk."
|
||||
title="Measures"
|
||||
description="Measures are actions taken to reduce the risk of a risk."
|
||||
>
|
||||
<div className="space-y-6">
|
||||
<div className="h-[72px] bg-subtle-bg animate-pulse rounded-xl" />
|
||||
@@ -31,13 +31,13 @@ export function MesureListViewSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export function MesureListPage() {
|
||||
export function MeasureListPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<MesureListViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<MeasureListViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<MesureListView />
|
||||
<MeasureListView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -21,11 +21,11 @@ import {
|
||||
} from "lucide-react";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { MesureListViewQuery as MesureListViewQueryType } from "./__generated__/MesureListViewQuery.graphql";
|
||||
import { MesureListViewSkeleton } from "./MesureListPage";
|
||||
import { MeasureListViewQuery as MeasureListViewQueryType } from "./__generated__/MeasureListViewQuery.graphql";
|
||||
import { MeasureListViewSkeleton } from "./MeasureListPage";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { MesureListViewImportMesureMutation as MesureListViewImportMesureMutationType } from "./__generated__/MesureListViewImportMesureMutation.graphql";
|
||||
import { MeasureListViewImportMeasureMutation as MeasureListViewImportMeasureMutationType } from "./__generated__/MeasureListViewImportMeasureMutation.graphql";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
@@ -38,12 +38,12 @@ import {
|
||||
PopoverTrigger,
|
||||
} from "@/components/ui/popover";
|
||||
|
||||
const mesureListViewQuery = graphql`
|
||||
query MesureListViewQuery($organizationId: ID!, $first: Int) {
|
||||
const measureListViewQuery = graphql`
|
||||
query MeasureListViewQuery($organizationId: ID!, $first: Int) {
|
||||
organization: node(id: $organizationId) {
|
||||
id
|
||||
... on Organization {
|
||||
mesures(first: $first) @connection(key: "MesureListView_mesures") {
|
||||
measures(first: $first) @connection(key: "MeasureListView_measures") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -61,13 +61,13 @@ const mesureListViewQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const importMesureMutation = graphql`
|
||||
mutation MesureListViewImportMesureMutation(
|
||||
$input: ImportMesureInput!
|
||||
const importMeasureMutation = graphql`
|
||||
mutation MeasureListViewImportMeasureMutation(
|
||||
$input: ImportMeasureInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
importMesure(input: $input) {
|
||||
mesureEdges @appendEdge(connections: $connections) {
|
||||
importMeasure(input: $input) {
|
||||
measureEdges @appendEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
name
|
||||
@@ -82,7 +82,7 @@ const importMesureMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
interface Mesure {
|
||||
interface Measure {
|
||||
id?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
@@ -98,7 +98,7 @@ interface Category {
|
||||
name: string;
|
||||
description: string;
|
||||
progress: number;
|
||||
mesures: Mesure[];
|
||||
measures: Measure[];
|
||||
doneCount: number;
|
||||
totalCount: number;
|
||||
}
|
||||
@@ -106,21 +106,21 @@ interface Category {
|
||||
interface OrganizationData {
|
||||
organization: {
|
||||
id: string;
|
||||
mesures?: {
|
||||
measures?: {
|
||||
edges: Array<{
|
||||
node: Mesure;
|
||||
node: Measure;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function MesureListContent({
|
||||
function MeasureListContent({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<MesureListViewQueryType>;
|
||||
queryRef: PreloadedQuery<MeasureListViewQueryType>;
|
||||
}) {
|
||||
const data = usePreloadedQuery<MesureListViewQueryType>(
|
||||
mesureListViewQuery,
|
||||
const data = usePreloadedQuery<MeasureListViewQueryType>(
|
||||
measureListViewQuery,
|
||||
queryRef
|
||||
) as unknown as OrganizationData;
|
||||
|
||||
@@ -129,8 +129,8 @@ function MesureListContent({
|
||||
const [isImporting, setIsImporting] = useState(false);
|
||||
const { toast } = useToast();
|
||||
|
||||
const [importMesure] =
|
||||
useMutation<MesureListViewImportMesureMutationType>(importMesureMutation);
|
||||
const [importMeasure] =
|
||||
useMutation<MeasureListViewImportMeasureMutationType>(importMeasureMutation);
|
||||
|
||||
// Monitor URL hash for changes and update state accordingly
|
||||
const [initialHashCategory] = useState(() =>
|
||||
@@ -175,10 +175,10 @@ function MesureListContent({
|
||||
};
|
||||
}, [expandedCategories]);
|
||||
|
||||
const mesures =
|
||||
data.organization.mesures?.edges.map((edge) => edge.node) ?? [];
|
||||
const measures =
|
||||
data.organization.measures?.edges.map((edge) => edge.node) ?? [];
|
||||
|
||||
// Map mesure state to status for the new design
|
||||
// Map measure state to status for the new design
|
||||
const mapStateToStatus = (state?: string): string => {
|
||||
if (!state) return "incomplete";
|
||||
switch (state) {
|
||||
@@ -195,48 +195,48 @@ function MesureListContent({
|
||||
}
|
||||
};
|
||||
|
||||
const processedMesures = mesures.map((mesure: Mesure) => ({
|
||||
...mesure,
|
||||
status: mapStateToStatus(mesure.state),
|
||||
const processedMeasures = measures.map((measure: Measure) => ({
|
||||
...measure,
|
||||
status: mapStateToStatus(measure.state),
|
||||
}));
|
||||
|
||||
// Calculate global progress
|
||||
const implementedCount = processedMesures.filter(
|
||||
(mesure: Mesure) => mesure.status === "complete"
|
||||
const implementedCount = processedMeasures.filter(
|
||||
(measure: Measure) => measure.status === "complete"
|
||||
).length;
|
||||
const notApplicableCount = processedMesures.filter(
|
||||
(mesure: Mesure) => mesure.status === "not-applicable"
|
||||
const notApplicableCount = processedMeasures.filter(
|
||||
(measure: Measure) => measure.status === "not-applicable"
|
||||
).length;
|
||||
const totalMesures = processedMesures.length;
|
||||
const totalMeasures = processedMeasures.length;
|
||||
|
||||
// Include not-applicable as effectively "complete" for progress percentage
|
||||
const effectiveCompletedCount = implementedCount + notApplicableCount;
|
||||
const globalProgress = totalMesures
|
||||
? Math.round((effectiveCompletedCount / totalMesures) * 100)
|
||||
const globalProgress = totalMeasures
|
||||
? Math.round((effectiveCompletedCount / totalMeasures) * 100)
|
||||
: 0;
|
||||
|
||||
// Get global status counts
|
||||
const globalStatusCounts = processedMesures.reduce(
|
||||
(acc: Record<string, number>, mesure: Mesure) => {
|
||||
if (mesure.status) {
|
||||
acc[mesure.status] = (acc[mesure.status] || 0) + 1;
|
||||
const globalStatusCounts = processedMeasures.reduce(
|
||||
(acc: Record<string, number>, measure: Measure) => {
|
||||
if (measure.status) {
|
||||
acc[measure.status] = (acc[measure.status] || 0) + 1;
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, number>
|
||||
);
|
||||
|
||||
// Group mesures by category
|
||||
const mesuresByCategory = processedMesures.reduce(
|
||||
(acc: Record<string, Mesure[]>, mesure: Mesure) => {
|
||||
if (!mesure?.category) return acc;
|
||||
if (!acc[mesure.category]) {
|
||||
acc[mesure.category] = [];
|
||||
// Group measures by category
|
||||
const measuresByCategory = processedMeasures.reduce(
|
||||
(acc: Record<string, Measure[]>, measure: Measure) => {
|
||||
if (!measure?.category) return acc;
|
||||
if (!acc[measure.category]) {
|
||||
acc[measure.category] = [];
|
||||
}
|
||||
acc[mesure.category].push(mesure);
|
||||
acc[measure.category].push(measure);
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, Mesure[]>
|
||||
{} as Record<string, Measure[]>
|
||||
);
|
||||
|
||||
// Function to toggle a category's expanded state
|
||||
@@ -250,17 +250,17 @@ function MesureListContent({
|
||||
});
|
||||
};
|
||||
|
||||
const categories: Category[] = Object.entries(mesuresByCategory)
|
||||
.map(([categoryName, categoryMesures]: [string, Mesure[]]) => {
|
||||
const catImplementedCount = categoryMesures.filter(
|
||||
(mesure) => mesure.status === "complete"
|
||||
const categories: Category[] = Object.entries(measuresByCategory)
|
||||
.map(([categoryName, categoryMeasures]: [string, Measure[]]) => {
|
||||
const catImplementedCount = categoryMeasures.filter(
|
||||
(measure) => measure.status === "complete"
|
||||
).length;
|
||||
const catNotApplicableCount = categoryMesures.filter(
|
||||
(mesure) => mesure.status === "not-applicable"
|
||||
const catNotApplicableCount = categoryMeasures.filter(
|
||||
(measure) => measure.status === "not-applicable"
|
||||
).length;
|
||||
// Consider both "complete" and "not-applicable" as done for category progress
|
||||
const catDoneCount = catImplementedCount + catNotApplicableCount;
|
||||
const catTotalCount = categoryMesures.length;
|
||||
const catTotalCount = categoryMeasures.length;
|
||||
const progress = catTotalCount
|
||||
? Math.round((catDoneCount / catTotalCount) * 100)
|
||||
: 0;
|
||||
@@ -268,16 +268,16 @@ function MesureListContent({
|
||||
return {
|
||||
id: categoryName,
|
||||
name: categoryName,
|
||||
description: `Mesures related to ${categoryName.toLowerCase()}`,
|
||||
description: `Measures related to ${categoryName.toLowerCase()}`,
|
||||
progress: progress,
|
||||
mesures: categoryMesures.sort((a, b) =>
|
||||
measures: categoryMeasures.sort((a, b) =>
|
||||
(a.name || "").localeCompare(b.name || "")
|
||||
),
|
||||
doneCount: catDoneCount,
|
||||
totalCount: catTotalCount,
|
||||
};
|
||||
})
|
||||
.filter((category) => category.mesures.length > 0)
|
||||
.filter((category) => category.measures.length > 0)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
const getStatusIcon = (status: string) => {
|
||||
@@ -303,12 +303,12 @@ function MesureListContent({
|
||||
|
||||
setIsImporting(true);
|
||||
|
||||
importMesure({
|
||||
importMeasure({
|
||||
variables: {
|
||||
connections: [
|
||||
ConnectionHandler.getConnectionID(
|
||||
data.organization.id,
|
||||
"MesureListView_mesures"
|
||||
"MeasureListView_measures"
|
||||
),
|
||||
],
|
||||
input: {
|
||||
@@ -322,8 +322,8 @@ function MesureListContent({
|
||||
onCompleted: () => {
|
||||
setIsImporting(false);
|
||||
toast({
|
||||
title: "Mesures imported",
|
||||
description: "Mesures have been imported successfully.",
|
||||
title: "Measures imported",
|
||||
description: "Measures have been imported successfully.",
|
||||
variant: "default",
|
||||
});
|
||||
if (fileInputRef.current) {
|
||||
@@ -333,7 +333,7 @@ function MesureListContent({
|
||||
onError: (error) => {
|
||||
setIsImporting(false);
|
||||
toast({
|
||||
title: "Error importing mesures",
|
||||
title: "Error importing measures",
|
||||
description: error.message,
|
||||
variant: "destructive",
|
||||
});
|
||||
@@ -343,8 +343,8 @@ function MesureListContent({
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title="Mesures"
|
||||
description="Mesures are actions taken to reduce the risk. Add them to track their implementation status."
|
||||
title="Measures"
|
||||
description="Measures are actions taken to reduce the risk. Add them to track their implementation status."
|
||||
actions={
|
||||
<div className="flex gap-4">
|
||||
<Button
|
||||
@@ -352,17 +352,17 @@ function MesureListContent({
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
disabled={isImporting}
|
||||
>
|
||||
{isImporting ? "Importing..." : "Import Mesures"}
|
||||
{isImporting ? "Importing..." : "Import Measures"}
|
||||
</Button>
|
||||
<Button asChild>
|
||||
<Link to={`/organizations/${organizationId}/mesures/new`}>
|
||||
New Mesure
|
||||
<Link to={`/organizations/${organizationId}/measures/new`}>
|
||||
New Measure
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{/* Hidden file input for mesure import */}
|
||||
{/* Hidden file input for measure import */}
|
||||
<input
|
||||
type="file"
|
||||
ref={fileInputRef}
|
||||
@@ -374,7 +374,7 @@ function MesureListContent({
|
||||
{/* Global Progress Summary */}
|
||||
<div className="mb-8">
|
||||
<div className="flex items-center justify-between mb-1">
|
||||
<h3 className="text-lg font-medium">Mesure Implementation</h3>
|
||||
<h3 className="text-lg font-medium">Measure Implementation</h3>
|
||||
<span className="text-sm text-tertiary">
|
||||
{globalProgress}% complete
|
||||
</span>
|
||||
@@ -390,7 +390,7 @@ function MesureListContent({
|
||||
className="bg-green-500 h-full"
|
||||
style={{
|
||||
width: `${
|
||||
(globalStatusCounts.complete / totalMesures) * 100
|
||||
(globalStatusCounts.complete / totalMeasures) * 100
|
||||
}%`,
|
||||
}}
|
||||
/>
|
||||
@@ -401,7 +401,7 @@ function MesureListContent({
|
||||
className="bg-blue-500 h-full"
|
||||
style={{
|
||||
width: `${
|
||||
(globalStatusCounts["in-progress"] / totalMesures) * 100
|
||||
(globalStatusCounts["in-progress"] / totalMeasures) * 100
|
||||
}%`,
|
||||
}}
|
||||
/>
|
||||
@@ -412,7 +412,7 @@ function MesureListContent({
|
||||
className="bg-red-500 h-full"
|
||||
style={{
|
||||
width: `${
|
||||
(globalStatusCounts.incomplete / totalMesures) * 100
|
||||
(globalStatusCounts.incomplete / totalMeasures) * 100
|
||||
}%`,
|
||||
}}
|
||||
/>
|
||||
@@ -423,7 +423,7 @@ function MesureListContent({
|
||||
className="bg-primary-bg h-full"
|
||||
style={{
|
||||
width: `${
|
||||
(globalStatusCounts["not-applicable"] / totalMesures) * 100
|
||||
(globalStatusCounts["not-applicable"] / totalMeasures) * 100
|
||||
}%`,
|
||||
}}
|
||||
/>
|
||||
@@ -434,7 +434,7 @@ function MesureListContent({
|
||||
className="bg-secondary h-full"
|
||||
style={{
|
||||
width: `${
|
||||
(globalStatusCounts["not-started"] / totalMesures) * 100
|
||||
(globalStatusCounts["not-started"] / totalMeasures) * 100
|
||||
}%`,
|
||||
}}
|
||||
/>
|
||||
@@ -514,7 +514,7 @@ function MesureListContent({
|
||||
|
||||
{isExpanded && (
|
||||
<CardContent className="p-0">
|
||||
{category.mesures.length > 0 ? (
|
||||
{category.measures.length > 0 ? (
|
||||
<div className="w-full">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
@@ -522,19 +522,19 @@ function MesureListContent({
|
||||
<th className="w-24 px-4 py-2 text-left">
|
||||
Status
|
||||
</th>
|
||||
<th className="px-4 py-2 text-left">Mesure</th>
|
||||
<th className="px-4 py-2 text-left">Measure</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y">
|
||||
{category.mesures.map((mesure) => (
|
||||
{category.measures.map((measure) => (
|
||||
<tr
|
||||
key={mesure.id || Math.random().toString()}
|
||||
key={measure.id || Math.random().toString()}
|
||||
className="hover:bg-h-subtle-bg cursor-pointer"
|
||||
>
|
||||
<td className="w-24 px-4 py-3 align-middle">
|
||||
<div className="flex items-center justify-center">
|
||||
{mesure.status
|
||||
? getStatusIcon(mesure.status)
|
||||
{measure.status
|
||||
? getStatusIcon(measure.status)
|
||||
: null}
|
||||
</div>
|
||||
</td>
|
||||
@@ -544,11 +544,11 @@ function MesureListContent({
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/mesures/${mesure.id}`}
|
||||
to={`/organizations/${organizationId}/measures/${measure.id}`}
|
||||
className="font-medium group flex items-center relative"
|
||||
>
|
||||
<span className="mr-1">
|
||||
{mesure.name}
|
||||
{measure.name}
|
||||
</span>
|
||||
<span className="absolute bottom-0 left-0 w-full h-0.5 bg-primary-bg scale-x-0 group-hover:scale-x-100 transition-transform"></span>
|
||||
</Link>
|
||||
@@ -567,7 +567,7 @@ function MesureListContent({
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="p-0 h-6 w-6 rounded-full hover:bg-primary-bg"
|
||||
aria-label="Learn more about this mesure"
|
||||
aria-label="Learn more about this measure"
|
||||
>
|
||||
<HelpCircle className="h-5 w-5 text-primary hover:text-primary" />
|
||||
</Button>
|
||||
@@ -580,20 +580,20 @@ function MesureListContent({
|
||||
<div className="space-y-3">
|
||||
<div className="flex justify-between items-start">
|
||||
<h4 className="font-bold text-md">
|
||||
{mesure.name}
|
||||
{measure.name}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
{mesure.description && (
|
||||
{measure.description && (
|
||||
<div className="text-sm">
|
||||
<p className="font-semibold mb-1">
|
||||
Why is this important:
|
||||
</p>
|
||||
<p>
|
||||
{mesure.description.startsWith(
|
||||
{measure.description.startsWith(
|
||||
"##"
|
||||
)
|
||||
? mesure.description
|
||||
? measure.description
|
||||
.split("\n")
|
||||
.find((line) =>
|
||||
line.startsWith(
|
||||
@@ -603,15 +603,15 @@ function MesureListContent({
|
||||
?.replace("## Why?", "")
|
||||
?.replace("## Why", "")
|
||||
?.trim() ||
|
||||
mesure.description.split(
|
||||
measure.description.split(
|
||||
"\n"
|
||||
)[1] ||
|
||||
""
|
||||
: mesure.description.substring(
|
||||
: measure.description.substring(
|
||||
0,
|
||||
180
|
||||
) +
|
||||
(mesure.description.length >
|
||||
(measure.description.length >
|
||||
180
|
||||
? "..."
|
||||
: "")}
|
||||
@@ -627,7 +627,7 @@ function MesureListContent({
|
||||
asChild
|
||||
>
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/mesures/${mesure.id}`}
|
||||
to={`/organizations/${organizationId}/measures/${measure.id}`}
|
||||
>
|
||||
<span>
|
||||
Implementation guide
|
||||
@@ -648,7 +648,7 @@ function MesureListContent({
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center justify-center p-6 text-center text-tertiary">
|
||||
No mesures in this category
|
||||
No measures in this category
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
@@ -662,9 +662,9 @@ function MesureListContent({
|
||||
);
|
||||
}
|
||||
|
||||
export default function MesureListView() {
|
||||
export default function MeasureListView() {
|
||||
const [queryRef, loadQuery] =
|
||||
useQueryLoader<MesureListViewQueryType>(mesureListViewQuery);
|
||||
useQueryLoader<MeasureListViewQueryType>(measureListViewQuery);
|
||||
|
||||
const { organizationId } = useParams();
|
||||
|
||||
@@ -676,12 +676,12 @@ export default function MesureListView() {
|
||||
}, [loadQuery, organizationId]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <MesureListViewSkeleton />;
|
||||
return <MeasureListViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<MesureListViewSkeleton />}>
|
||||
<MesureListContent queryRef={queryRef} />
|
||||
<Suspense fallback={<MeasureListViewSkeleton />}>
|
||||
<MeasureListContent queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -5,9 +5,9 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const MesureView = lazy(() => import("./MesureView"));
|
||||
const MeasureView = lazy(() => import("./MeasureView"));
|
||||
|
||||
export function MesureViewSkeleton() {
|
||||
export function MeasureViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
actions={
|
||||
@@ -32,13 +32,13 @@ export function MesureViewSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export function MesurePage() {
|
||||
export function MeasurePage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<MesureViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<MeasureViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<MesureView />
|
||||
<MeasureView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -80,34 +80,34 @@ import {
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { MesureViewSkeleton } from "./MesurePage";
|
||||
import { MesureViewUpdateTaskStateMutation as MesureViewUpdateTaskStateMutationType } from "./__generated__/MesureViewUpdateTaskStateMutation.graphql";
|
||||
import { MesureViewCreateTaskMutation as MesureViewCreateTaskMutationType } from "./__generated__/MesureViewCreateTaskMutation.graphql";
|
||||
import { MesureViewDeleteTaskMutation as MesureViewDeleteTaskMutationType } from "./__generated__/MesureViewDeleteTaskMutation.graphql";
|
||||
import { MesureViewDeleteEvidenceMutation as MesureViewDeleteEvidenceMutationType } from "./__generated__/MesureViewDeleteEvidenceMutation.graphql";
|
||||
import { MesureViewAssignTaskMutation as MesureViewAssignTaskMutationType } from "./__generated__/MesureViewAssignTaskMutation.graphql";
|
||||
import { MesureViewUnassignTaskMutation as MesureViewUnassignTaskMutationType } from "./__generated__/MesureViewUnassignTaskMutation.graphql";
|
||||
import { MesureViewUpdateMesureStateMutation as MesureViewUpdateMesureStateMutationType } from "./__generated__/MesureViewUpdateMesureStateMutation.graphql";
|
||||
import { MesureViewQuery as MesureViewQueryType } from "./__generated__/MesureViewQuery.graphql";
|
||||
import { MeasureViewSkeleton } from "./MeasurePage";
|
||||
import { MeasureViewUpdateTaskStateMutation as MeasureViewUpdateTaskStateMutationType } from "./__generated__/MeasureViewUpdateTaskStateMutation.graphql";
|
||||
import { MeasureViewCreateTaskMutation as MeasureViewCreateTaskMutationType } from "./__generated__/MeasureViewCreateTaskMutation.graphql";
|
||||
import { MeasureViewDeleteTaskMutation as MeasureViewDeleteTaskMutationType } from "./__generated__/MeasureViewDeleteTaskMutation.graphql";
|
||||
import { MeasureViewDeleteEvidenceMutation as MeasureViewDeleteEvidenceMutationType } from "./__generated__/MeasureViewDeleteEvidenceMutation.graphql";
|
||||
import { MeasureViewAssignTaskMutation as MeasureViewAssignTaskMutationType } from "./__generated__/MeasureViewAssignTaskMutation.graphql";
|
||||
import { MeasureViewUnassignTaskMutation as MeasureViewUnassignTaskMutationType } from "./__generated__/MeasureViewUnassignTaskMutation.graphql";
|
||||
import { MeasureViewUpdateMeasureStateMutation as MeasureViewUpdateMeasureStateMutationType } from "./__generated__/MeasureViewUpdateMeasureStateMutation.graphql";
|
||||
import { MeasureViewQuery as MeasureViewQueryType } from "./__generated__/MeasureViewQuery.graphql";
|
||||
import {
|
||||
MesureViewOrganizationQuery,
|
||||
MesureViewOrganizationQuery$data,
|
||||
} from "./__generated__/MesureViewOrganizationQuery.graphql";
|
||||
MeasureViewOrganizationQuery,
|
||||
MeasureViewOrganizationQuery$data,
|
||||
} from "./__generated__/MeasureViewOrganizationQuery.graphql";
|
||||
import {
|
||||
MesureViewFrameworksQuery,
|
||||
MesureViewFrameworksQuery$data,
|
||||
} from "./__generated__/MesureViewFrameworksQuery.graphql";
|
||||
MeasureViewFrameworksQuery,
|
||||
MeasureViewFrameworksQuery$data,
|
||||
} from "./__generated__/MeasureViewFrameworksQuery.graphql";
|
||||
import {
|
||||
MesureViewLinkedControlsQuery,
|
||||
MesureViewLinkedControlsQuery$data,
|
||||
} from "./__generated__/MesureViewLinkedControlsQuery.graphql";
|
||||
import { MesureViewCreateEvidenceMutation as MesureViewCreateEvidenceMutationType } from "./__generated__/MesureViewCreateEvidenceMutation.graphql";
|
||||
import { MesureViewFulfillEvidenceMutation as MesureViewFulfillEvidenceMutationType } from "./__generated__/MesureViewFulfillEvidenceMutation.graphql";
|
||||
import { MesureViewCreateControlMappingMutation } from "./__generated__/MesureViewCreateControlMappingMutation.graphql";
|
||||
import { MesureViewDeleteControlMappingMutation } from "./__generated__/MesureViewDeleteControlMappingMutation.graphql";
|
||||
import { MesureViewRisksQuery$data } from "./__generated__/MesureViewRisksQuery.graphql";
|
||||
import { MesureViewRisksQuery } from "./__generated__/MesureViewRisksQuery.graphql";
|
||||
import { MesureViewDeleteMesureMutation } from "./__generated__/MesureViewDeleteMesureMutation.graphql";
|
||||
MeasureViewLinkedControlsQuery,
|
||||
MeasureViewLinkedControlsQuery$data,
|
||||
} from "./__generated__/MeasureViewLinkedControlsQuery.graphql";
|
||||
import { MeasureViewCreateEvidenceMutation as MeasureViewCreateEvidenceMutationType } from "./__generated__/MeasureViewCreateEvidenceMutation.graphql";
|
||||
import { MeasureViewFulfillEvidenceMutation as MeasureViewFulfillEvidenceMutationType } from "./__generated__/MeasureViewFulfillEvidenceMutation.graphql";
|
||||
import { MeasureViewCreateControlMappingMutation } from "./__generated__/MeasureViewCreateControlMappingMutation.graphql";
|
||||
import { MeasureViewDeleteControlMappingMutation } from "./__generated__/MeasureViewDeleteControlMappingMutation.graphql";
|
||||
import { MeasureViewRisksQuery$data } from "./__generated__/MeasureViewRisksQuery.graphql";
|
||||
import { MeasureViewRisksQuery } from "./__generated__/MeasureViewRisksQuery.graphql";
|
||||
import { MeasureViewDeleteMeasureMutation } from "./__generated__/MeasureViewDeleteMeasureMutation.graphql";
|
||||
|
||||
// Function to format ISO8601 duration to human-readable format
|
||||
const formatDuration = (isoDuration: string): string => {
|
||||
@@ -146,16 +146,16 @@ const formatDuration = (isoDuration: string): string => {
|
||||
}
|
||||
};
|
||||
|
||||
const mesureViewQuery = graphql`
|
||||
query MesureViewQuery($mesureId: ID!) {
|
||||
mesure: node(id: $mesureId) {
|
||||
const measureViewQuery = graphql`
|
||||
query MeasureViewQuery($measureId: ID!) {
|
||||
measure: node(id: $measureId) {
|
||||
id
|
||||
... on Mesure {
|
||||
... on Measure {
|
||||
name
|
||||
description
|
||||
state
|
||||
category
|
||||
tasks(first: 100) @connection(key: "MesureView_tasks") {
|
||||
tasks(first: 100) @connection(key: "MeasureView_tasks") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
@@ -169,7 +169,7 @@ const mesureViewQuery = graphql`
|
||||
fullName
|
||||
primaryEmailAddress
|
||||
}
|
||||
evidences(first: 50) @connection(key: "MesureView_evidences") {
|
||||
evidences(first: 50) @connection(key: "MeasureView_evidences") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
@@ -194,7 +194,7 @@ const mesureViewQuery = graphql`
|
||||
`;
|
||||
|
||||
const updateTaskStateMutation = graphql`
|
||||
mutation MesureViewUpdateTaskStateMutation($input: UpdateTaskInput!) {
|
||||
mutation MeasureViewUpdateTaskStateMutation($input: UpdateTaskInput!) {
|
||||
updateTask(input: $input) {
|
||||
task {
|
||||
id
|
||||
@@ -206,7 +206,7 @@ const updateTaskStateMutation = graphql`
|
||||
`;
|
||||
|
||||
const createTaskMutation = graphql`
|
||||
mutation MesureViewCreateTaskMutation(
|
||||
mutation MeasureViewCreateTaskMutation(
|
||||
$input: CreateTaskInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -230,7 +230,7 @@ const createTaskMutation = graphql`
|
||||
`;
|
||||
|
||||
const deleteTaskMutation = graphql`
|
||||
mutation MesureViewDeleteTaskMutation(
|
||||
mutation MeasureViewDeleteTaskMutation(
|
||||
$input: DeleteTaskInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -241,7 +241,7 @@ const deleteTaskMutation = graphql`
|
||||
`;
|
||||
|
||||
const createEvidenceMutation = graphql`
|
||||
mutation MesureViewCreateEvidenceMutation(
|
||||
mutation MeasureViewCreateEvidenceMutation(
|
||||
$input: CreateEvidenceInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -265,7 +265,7 @@ const createEvidenceMutation = graphql`
|
||||
`;
|
||||
|
||||
const deleteEvidenceMutation = graphql`
|
||||
mutation MesureViewDeleteEvidenceMutation(
|
||||
mutation MeasureViewDeleteEvidenceMutation(
|
||||
$input: DeleteEvidenceInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -277,7 +277,7 @@ const deleteEvidenceMutation = graphql`
|
||||
|
||||
// Add a GraphQL query to fetch the fileUrl for an evidence item
|
||||
const getEvidenceFileUrlQuery = graphql`
|
||||
query MesureViewGetEvidenceFileUrlQuery($evidenceId: ID!) {
|
||||
query MeasureViewGetEvidenceFileUrlQuery($evidenceId: ID!) {
|
||||
node(id: $evidenceId) {
|
||||
... on Evidence {
|
||||
id
|
||||
@@ -288,7 +288,7 @@ const getEvidenceFileUrlQuery = graphql`
|
||||
`;
|
||||
|
||||
const assignTaskMutation = graphql`
|
||||
mutation MesureViewAssignTaskMutation($input: AssignTaskInput!) {
|
||||
mutation MeasureViewAssignTaskMutation($input: AssignTaskInput!) {
|
||||
assignTask(input: $input) {
|
||||
task {
|
||||
id
|
||||
@@ -303,7 +303,7 @@ const assignTaskMutation = graphql`
|
||||
`;
|
||||
|
||||
const unassignTaskMutation = graphql`
|
||||
mutation MesureViewUnassignTaskMutation($input: UnassignTaskInput!) {
|
||||
mutation MeasureViewUnassignTaskMutation($input: UnassignTaskInput!) {
|
||||
unassignTask(input: $input) {
|
||||
task {
|
||||
id
|
||||
@@ -317,10 +317,10 @@ const unassignTaskMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const updateMesureStateMutation = graphql`
|
||||
mutation MesureViewUpdateMesureStateMutation($input: UpdateMesureInput!) {
|
||||
updateMesure(input: $input) {
|
||||
mesure {
|
||||
const updateMeasureStateMutation = graphql`
|
||||
mutation MeasureViewUpdateMeasureStateMutation($input: UpdateMeasureInput!) {
|
||||
updateMeasure(input: $input) {
|
||||
measure {
|
||||
id
|
||||
state
|
||||
}
|
||||
@@ -328,24 +328,24 @@ const updateMesureStateMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const deleteMesureMutation = graphql`
|
||||
mutation MesureViewDeleteMesureMutation(
|
||||
$input: DeleteMesureInput!
|
||||
const deleteMeasureMutation = graphql`
|
||||
mutation MeasureViewDeleteMeasureMutation(
|
||||
$input: DeleteMeasureInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteMesure(input: $input) {
|
||||
deletedMesureId @deleteEdge(connections: $connections)
|
||||
deleteMeasure(input: $input) {
|
||||
deletedMeasureId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const organizationQuery = graphql`
|
||||
query MesureViewOrganizationQuery($organizationId: ID!) {
|
||||
query MeasureViewOrganizationQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
id
|
||||
... on Organization {
|
||||
peoples(first: 100, orderBy: { direction: ASC, field: FULL_NAME })
|
||||
@connection(key: "MesureView_peoples") {
|
||||
@connection(key: "MeasureView_peoples") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -361,7 +361,7 @@ const organizationQuery = graphql`
|
||||
|
||||
// New queries and mutations for Control Mapping
|
||||
const frameworksQuery = graphql`
|
||||
query MesureViewFrameworksQuery($organizationId: ID!) {
|
||||
query MeasureViewFrameworksQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
id
|
||||
... on Organization {
|
||||
@@ -389,11 +389,11 @@ const frameworksQuery = graphql`
|
||||
`;
|
||||
|
||||
const linkedControlsQuery = graphql`
|
||||
query MesureViewLinkedControlsQuery($mesureId: ID!) {
|
||||
mesure: node(id: $mesureId) {
|
||||
query MeasureViewLinkedControlsQuery($measureId: ID!) {
|
||||
measure: node(id: $measureId) {
|
||||
id
|
||||
... on Mesure {
|
||||
controls(first: 100) @connection(key: "MesureView_controls") {
|
||||
... on Measure {
|
||||
controls(first: 100) @connection(key: "MeasureView_controls") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -409,20 +409,20 @@ const linkedControlsQuery = graphql`
|
||||
`;
|
||||
|
||||
const createControlMappingMutation = graphql`
|
||||
mutation MesureViewCreateControlMappingMutation(
|
||||
$input: CreateControlMesureMappingInput!
|
||||
mutation MeasureViewCreateControlMappingMutation(
|
||||
$input: CreateControlMeasureMappingInput!
|
||||
) {
|
||||
createControlMesureMapping(input: $input) {
|
||||
createControlMeasureMapping(input: $input) {
|
||||
success
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const deleteControlMappingMutation = graphql`
|
||||
mutation MesureViewDeleteControlMappingMutation(
|
||||
$input: DeleteControlMesureMappingInput!
|
||||
mutation MeasureViewDeleteControlMappingMutation(
|
||||
$input: DeleteControlMeasureMappingInput!
|
||||
) {
|
||||
deleteControlMesureMapping(input: $input) {
|
||||
deleteControlMeasureMapping(input: $input) {
|
||||
success
|
||||
}
|
||||
}
|
||||
@@ -430,7 +430,7 @@ const deleteControlMappingMutation = graphql`
|
||||
|
||||
// Add a mutation to fulfill evidence
|
||||
const fulfillEvidenceMutation = graphql`
|
||||
mutation MesureViewFulfillEvidenceMutation(
|
||||
mutation MeasureViewFulfillEvidenceMutation(
|
||||
$input: FulfillEvidenceInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -453,13 +453,13 @@ const fulfillEvidenceMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
// Add query to fetch risks linked to a mesure
|
||||
const mesureRisksQuery = graphql`
|
||||
query MesureViewRisksQuery($mesureId: ID!) {
|
||||
mesure: node(id: $mesureId) {
|
||||
// Add query to fetch risks linked to a measure
|
||||
const measureRisksQuery = graphql`
|
||||
query MeasureViewRisksQuery($measureId: ID!) {
|
||||
measure: node(id: $measureId) {
|
||||
id
|
||||
... on Mesure {
|
||||
risks(first: 100) @connection(key: "MesureView_risks") {
|
||||
... on Measure {
|
||||
risks(first: 100) @connection(key: "MeasureView_risks") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -481,25 +481,25 @@ const mesureRisksQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
function MesureViewContent({
|
||||
function MeasureViewContent({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<MesureViewQueryType>;
|
||||
queryRef: PreloadedQuery<MeasureViewQueryType>;
|
||||
}) {
|
||||
const data = usePreloadedQuery<MesureViewQueryType>(
|
||||
mesureViewQuery,
|
||||
const data = usePreloadedQuery<MeasureViewQueryType>(
|
||||
measureViewQuery,
|
||||
queryRef
|
||||
);
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
const { organizationId, mesureId } = useParams<{
|
||||
const { organizationId, measureId } = useParams<{
|
||||
organizationId: string;
|
||||
mesureId: string;
|
||||
measureId: string;
|
||||
}>();
|
||||
const environment = useRelayEnvironment();
|
||||
|
||||
const [commitDeleteMesure, isDeletingMesure] = useMutation<MesureViewDeleteMesureMutation>(deleteMesureMutation);
|
||||
const [isDeleteMesureOpen, setIsDeleteMesureOpen] = useState(false);
|
||||
const [commitDeleteMeasure, isDeletingMeasure] = useMutation<MeasureViewDeleteMeasureMutation>(deleteMeasureMutation);
|
||||
const [isDeleteMeasureOpen, setIsDeleteMeasureOpen] = useState(false);
|
||||
|
||||
// Add state for main content tabs
|
||||
const [mainContentTab, setMainContentTab] = useState<string>("tasks");
|
||||
@@ -510,15 +510,15 @@ function MesureViewContent({
|
||||
|
||||
// Load organization data for people selector
|
||||
const [organizationData, setOrganizationData] =
|
||||
useState<MesureViewOrganizationQuery$data | null>(null);
|
||||
useState<MeasureViewOrganizationQuery$data | null>(null);
|
||||
|
||||
// Control mapping state
|
||||
const [isControlMappingDialogOpen, setIsControlMappingDialogOpen] =
|
||||
useState(false);
|
||||
const [frameworksData, setFrameworksData] =
|
||||
useState<MesureViewFrameworksQuery$data | null>(null);
|
||||
useState<MeasureViewFrameworksQuery$data | null>(null);
|
||||
const [linkedControlsData, setLinkedControlsData] =
|
||||
useState<MesureViewLinkedControlsQuery$data | null>(null);
|
||||
useState<MeasureViewLinkedControlsQuery$data | null>(null);
|
||||
const [controlSearchQuery, setControlSearchQuery] = useState("");
|
||||
const [selectedFrameworkId, setSelectedFrameworkId] = useState<string | null>(
|
||||
null
|
||||
@@ -529,17 +529,17 @@ function MesureViewContent({
|
||||
|
||||
// Create mutation hooks for control mapping
|
||||
const [commitCreateControlMapping] =
|
||||
useMutation<MesureViewCreateControlMappingMutation>(
|
||||
useMutation<MeasureViewCreateControlMappingMutation>(
|
||||
createControlMappingMutation
|
||||
);
|
||||
const [commitDeleteControlMapping] =
|
||||
useMutation<MesureViewDeleteControlMappingMutation>(
|
||||
useMutation<MeasureViewDeleteControlMappingMutation>(
|
||||
deleteControlMappingMutation
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (organizationId) {
|
||||
fetchQuery<MesureViewOrganizationQuery>(environment, organizationQuery, {
|
||||
fetchQuery<MeasureViewOrganizationQuery>(environment, organizationQuery, {
|
||||
organizationId,
|
||||
}).subscribe({
|
||||
next: (data) => {
|
||||
@@ -554,11 +554,11 @@ function MesureViewContent({
|
||||
|
||||
// Load linked controls when component mounts
|
||||
useEffect(() => {
|
||||
if (mesureId) {
|
||||
fetchQuery<MesureViewLinkedControlsQuery>(
|
||||
if (measureId) {
|
||||
fetchQuery<MeasureViewLinkedControlsQuery>(
|
||||
environment,
|
||||
linkedControlsQuery,
|
||||
{ mesureId }
|
||||
{ measureId }
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
setLinkedControlsData(data);
|
||||
@@ -568,18 +568,18 @@ function MesureViewContent({
|
||||
},
|
||||
});
|
||||
}
|
||||
}, [environment, mesureId]);
|
||||
}, [environment, measureId]);
|
||||
|
||||
// Add state for risks data
|
||||
const [risksData, setRisksData] = useState<MesureViewRisksQuery$data | null>(
|
||||
const [risksData, setRisksData] = useState<MeasureViewRisksQuery$data | null>(
|
||||
null
|
||||
);
|
||||
|
||||
// Load risks data when component mounts
|
||||
useEffect(() => {
|
||||
if (mesureId) {
|
||||
fetchQuery<MesureViewRisksQuery>(environment, mesureRisksQuery, {
|
||||
mesureId,
|
||||
if (measureId) {
|
||||
fetchQuery<MeasureViewRisksQuery>(environment, measureRisksQuery, {
|
||||
measureId,
|
||||
}).subscribe({
|
||||
next: (data) => {
|
||||
setRisksData(data);
|
||||
@@ -589,7 +589,7 @@ function MesureViewContent({
|
||||
},
|
||||
});
|
||||
}
|
||||
}, [environment, mesureId]);
|
||||
}, [environment, measureId]);
|
||||
|
||||
const formatState = (state: string | undefined): string => {
|
||||
if (!state) return "";
|
||||
@@ -618,30 +618,30 @@ function MesureViewContent({
|
||||
return "bg-secondary-bg text-primary";
|
||||
};
|
||||
|
||||
const [updateTask] = useMutation<MesureViewUpdateTaskStateMutationType>(
|
||||
const [updateTask] = useMutation<MeasureViewUpdateTaskStateMutationType>(
|
||||
updateTaskStateMutation
|
||||
);
|
||||
const [createTask] =
|
||||
useMutation<MesureViewCreateTaskMutationType>(createTaskMutation);
|
||||
useMutation<MeasureViewCreateTaskMutationType>(createTaskMutation);
|
||||
const [deleteTask] =
|
||||
useMutation<MesureViewDeleteTaskMutationType>(deleteTaskMutation);
|
||||
const [createEvidence] = useMutation<MesureViewCreateEvidenceMutationType>(
|
||||
useMutation<MeasureViewDeleteTaskMutationType>(deleteTaskMutation);
|
||||
const [createEvidence] = useMutation<MeasureViewCreateEvidenceMutationType>(
|
||||
createEvidenceMutation
|
||||
);
|
||||
const [deleteEvidence] = useMutation<MesureViewDeleteEvidenceMutationType>(
|
||||
const [deleteEvidence] = useMutation<MeasureViewDeleteEvidenceMutationType>(
|
||||
deleteEvidenceMutation
|
||||
);
|
||||
const [assignTask] =
|
||||
useMutation<MesureViewAssignTaskMutationType>(assignTaskMutation);
|
||||
useMutation<MeasureViewAssignTaskMutationType>(assignTaskMutation);
|
||||
const [unassignTask] =
|
||||
useMutation<MesureViewUnassignTaskMutationType>(unassignTaskMutation);
|
||||
const [fulfillEvidence] = useMutation<MesureViewFulfillEvidenceMutationType>(
|
||||
useMutation<MeasureViewUnassignTaskMutationType>(unassignTaskMutation);
|
||||
const [fulfillEvidence] = useMutation<MeasureViewFulfillEvidenceMutationType>(
|
||||
fulfillEvidenceMutation
|
||||
);
|
||||
|
||||
const [updateMesureState] =
|
||||
useMutation<MesureViewUpdateMesureStateMutationType>(
|
||||
updateMesureStateMutation
|
||||
const [updateMeasureState] =
|
||||
useMutation<MeasureViewUpdateMeasureStateMutationType>(
|
||||
updateMeasureStateMutation
|
||||
);
|
||||
|
||||
const [isCreateTaskOpen, setIsCreateTaskOpen] = useState(false);
|
||||
@@ -724,7 +724,7 @@ function MesureViewContent({
|
||||
// Track if task panel is open
|
||||
const [isTaskPanelOpen, setIsTaskPanelOpen] = useState(false);
|
||||
|
||||
const tasks = data.mesure.tasks?.edges.map((edge) => edge.node) || [];
|
||||
const tasks = data.measure.tasks?.edges.map((edge) => edge.node) || [];
|
||||
|
||||
// Add useEffect to handle URL parameters for task selection
|
||||
useEffect(() => {
|
||||
@@ -866,10 +866,10 @@ function MesureViewContent({
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.mesure.id) {
|
||||
if (!data.measure.id) {
|
||||
toast({
|
||||
title: "Error creating task",
|
||||
description: "Mesure ID is missing",
|
||||
description: "Measure ID is missing",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -879,9 +879,9 @@ function MesureViewContent({
|
||||
|
||||
createTask({
|
||||
variables: {
|
||||
connections: [`${data.mesure.tasks?.__id}`],
|
||||
connections: [`${data.measure.tasks?.__id}`],
|
||||
input: {
|
||||
mesureId: data.mesure.id,
|
||||
measureId: data.measure.id,
|
||||
name: newTaskName,
|
||||
description: newTaskDescription,
|
||||
timeEstimate: isoTimeEstimate === "" ? null : isoTimeEstimate,
|
||||
@@ -919,7 +919,7 @@ function MesureViewContent({
|
||||
|
||||
deleteTask({
|
||||
variables: {
|
||||
connections: [`${data.mesure.tasks?.__id}`],
|
||||
connections: [`${data.measure.tasks?.__id}`],
|
||||
input: {
|
||||
taskId: taskToDelete.id,
|
||||
},
|
||||
@@ -942,8 +942,8 @@ function MesureViewContent({
|
||||
});
|
||||
};
|
||||
|
||||
const handleEditMesure = () => {
|
||||
navigate(`/organizations/${organizationId}/mesures/${mesureId}/edit`);
|
||||
const handleEditMeasure = () => {
|
||||
navigate(`/organizations/${organizationId}/measures/${measureId}/edit`);
|
||||
};
|
||||
|
||||
const handleCreateEvidence = (taskId: string, taskName: string) => {
|
||||
@@ -1415,12 +1415,12 @@ function MesureViewContent({
|
||||
});
|
||||
};
|
||||
|
||||
// Function to handle mesure state change
|
||||
const handleMesureStateChange = (newState: string) => {
|
||||
updateMesureState({
|
||||
// Function to handle measure state change
|
||||
const handleMeasureStateChange = (newState: string) => {
|
||||
updateMeasureState({
|
||||
variables: {
|
||||
input: {
|
||||
id: data.mesure.id,
|
||||
id: data.measure.id,
|
||||
state: newState as
|
||||
| "NOT_STARTED"
|
||||
| "IN_PROGRESS"
|
||||
@@ -1430,15 +1430,15 @@ function MesureViewContent({
|
||||
},
|
||||
onCompleted: () => {
|
||||
toast({
|
||||
title: "Mesure state updated",
|
||||
description: `Mesure state has been updated to ${formatState(
|
||||
title: "Measure state updated",
|
||||
description: `Measure state has been updated to ${formatState(
|
||||
newState
|
||||
)}.`,
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
toast({
|
||||
title: "Error updating mesure state",
|
||||
title: "Error updating measure state",
|
||||
description: error.message,
|
||||
variant: "destructive",
|
||||
});
|
||||
@@ -1569,12 +1569,12 @@ function MesureViewContent({
|
||||
|
||||
// Control mapping functions
|
||||
const loadFrameworksAndControls = useCallback(() => {
|
||||
if (!organizationId || !mesureId) return;
|
||||
if (!organizationId || !measureId) return;
|
||||
|
||||
setIsLoadingControls(true);
|
||||
|
||||
// Fetch all frameworks and their controls
|
||||
fetchQuery<MesureViewFrameworksQuery>(environment, frameworksQuery, {
|
||||
fetchQuery<MeasureViewFrameworksQuery>(environment, frameworksQuery, {
|
||||
organizationId,
|
||||
}).subscribe({
|
||||
next: (data) => {
|
||||
@@ -1592,12 +1592,12 @@ function MesureViewContent({
|
||||
}
|
||||
},
|
||||
complete: () => {
|
||||
// Fetch already linked controls for this mesure
|
||||
fetchQuery<MesureViewLinkedControlsQuery>(
|
||||
// Fetch already linked controls for this measure
|
||||
fetchQuery<MeasureViewLinkedControlsQuery>(
|
||||
environment,
|
||||
linkedControlsQuery,
|
||||
{
|
||||
mesureId,
|
||||
measureId,
|
||||
}
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
@@ -1625,7 +1625,7 @@ function MesureViewContent({
|
||||
});
|
||||
},
|
||||
});
|
||||
}, [environment, mesureId, organizationId, selectedFrameworkId, toast]);
|
||||
}, [environment, measureId, organizationId, selectedFrameworkId, toast]);
|
||||
|
||||
const getControls = useCallback(() => {
|
||||
if (!frameworksData?.organization?.frameworks?.edges) return [];
|
||||
@@ -1649,8 +1649,8 @@ function MesureViewContent({
|
||||
}, [frameworksData, selectedFrameworkId]);
|
||||
|
||||
const getLinkedControls = useCallback(() => {
|
||||
if (!linkedControlsData?.mesure?.controls?.edges) return [];
|
||||
return (linkedControlsData.mesure.controls.edges || []).map(
|
||||
if (!linkedControlsData?.measure?.controls?.edges) return [];
|
||||
return (linkedControlsData.measure.controls.edges || []).map(
|
||||
(edge) => edge.node
|
||||
);
|
||||
}, [linkedControlsData]);
|
||||
@@ -1665,7 +1665,7 @@ function MesureViewContent({
|
||||
|
||||
const handleLinkControl = useCallback(
|
||||
(controlId: string) => {
|
||||
if (!mesureId) return;
|
||||
if (!measureId) return;
|
||||
|
||||
setIsLinkingControl(true);
|
||||
|
||||
@@ -1673,7 +1673,7 @@ function MesureViewContent({
|
||||
variables: {
|
||||
input: {
|
||||
controlId,
|
||||
mesureId,
|
||||
measureId,
|
||||
},
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
@@ -1690,11 +1690,11 @@ function MesureViewContent({
|
||||
}
|
||||
|
||||
// Refresh linked controls data
|
||||
fetchQuery<MesureViewLinkedControlsQuery>(
|
||||
fetchQuery<MeasureViewLinkedControlsQuery>(
|
||||
environment,
|
||||
linkedControlsQuery,
|
||||
{
|
||||
mesureId,
|
||||
measureId,
|
||||
}
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
@@ -1707,7 +1707,7 @@ function MesureViewContent({
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Control successfully linked to mesure.",
|
||||
description: "Control successfully linked to measure.",
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
@@ -1721,12 +1721,12 @@ function MesureViewContent({
|
||||
},
|
||||
});
|
||||
},
|
||||
[commitCreateControlMapping, environment, mesureId, toast]
|
||||
[commitCreateControlMapping, environment, measureId, toast]
|
||||
);
|
||||
|
||||
const handleUnlinkControl = useCallback(
|
||||
(controlId: string) => {
|
||||
if (!mesureId) return;
|
||||
if (!measureId) return;
|
||||
|
||||
setIsUnlinkingControl(true);
|
||||
|
||||
@@ -1734,7 +1734,7 @@ function MesureViewContent({
|
||||
variables: {
|
||||
input: {
|
||||
controlId,
|
||||
mesureId,
|
||||
measureId,
|
||||
},
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
@@ -1752,10 +1752,10 @@ function MesureViewContent({
|
||||
|
||||
// Refresh linked controls data
|
||||
fetchQuery(environment, linkedControlsQuery, {
|
||||
mesureId,
|
||||
measureId,
|
||||
}).subscribe({
|
||||
next: (data: unknown) => {
|
||||
setLinkedControlsData(data as MesureViewLinkedControlsQuery$data);
|
||||
setLinkedControlsData(data as MeasureViewLinkedControlsQuery$data);
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error refreshing linked controls:", error);
|
||||
@@ -1764,7 +1764,7 @@ function MesureViewContent({
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Control successfully unlinked from mesure.",
|
||||
description: "Control successfully unlinked from measure.",
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
@@ -1778,7 +1778,7 @@ function MesureViewContent({
|
||||
},
|
||||
});
|
||||
},
|
||||
[commitDeleteControlMapping, environment, mesureId, toast]
|
||||
[commitDeleteControlMapping, environment, measureId, toast]
|
||||
);
|
||||
|
||||
const handleOpenControlMappingDialog = useCallback(() => {
|
||||
@@ -1834,33 +1834,33 @@ function MesureViewContent({
|
||||
return "Very High";
|
||||
};
|
||||
|
||||
const handleDeleteMesure = () => {
|
||||
setIsDeleteMesureOpen(true);
|
||||
const handleDeleteMeasure = () => {
|
||||
setIsDeleteMeasureOpen(true);
|
||||
};
|
||||
|
||||
const confirmDeleteMesure = () => {
|
||||
const confirmDeleteMeasure = () => {
|
||||
const connectionId = ConnectionHandler.getConnectionID(
|
||||
organizationId!,
|
||||
"MesureListView_mesures"
|
||||
"MeasureListView_measures"
|
||||
);
|
||||
|
||||
commitDeleteMesure({
|
||||
commitDeleteMeasure({
|
||||
variables: {
|
||||
connections: [connectionId],
|
||||
input: {
|
||||
mesureId: mesureId!,
|
||||
measureId: measureId!,
|
||||
},
|
||||
},
|
||||
onCompleted: () => {
|
||||
toast({
|
||||
title: "Mesure deleted",
|
||||
description: "Mesure has been deleted successfully.",
|
||||
title: "Measure deleted",
|
||||
description: "Measure has been deleted successfully.",
|
||||
});
|
||||
navigate(`/organizations/${organizationId}/mesures`);
|
||||
navigate(`/organizations/${organizationId}/measures`);
|
||||
},
|
||||
onError: (error) => {
|
||||
toast({
|
||||
title: "Error deleting mesure",
|
||||
title: "Error deleting measure",
|
||||
description: error.message,
|
||||
variant: "destructive",
|
||||
});
|
||||
@@ -1870,19 +1870,19 @@ function MesureViewContent({
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title={data.mesure?.name || "Mesure"}
|
||||
description={data.mesure?.description}
|
||||
title={data.measure?.name || "Measure"}
|
||||
description={data.measure?.description}
|
||||
actions={
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={handleEditMesure}
|
||||
onClick={handleEditMeasure}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
<select
|
||||
value={data.mesure?.state || ""}
|
||||
onChange={(e) => handleMesureStateChange(e.target.value)}
|
||||
value={data.measure?.state || ""}
|
||||
onChange={(e) => handleMeasureStateChange(e.target.value)}
|
||||
className="rounded-full cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-active-b disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-low-b hover:bg-h-tertiary-bg active:bg-p-tertiary-bg focus:bg-tertiary-bg shadow-xs px-2"
|
||||
>
|
||||
<option value="">Select state</option>
|
||||
@@ -1893,10 +1893,10 @@ function MesureViewContent({
|
||||
</select>
|
||||
<Button
|
||||
variant="destructive"
|
||||
onClick={() => handleDeleteMesure()}
|
||||
disabled={isDeletingMesure}
|
||||
onClick={() => handleDeleteMeasure()}
|
||||
disabled={isDeletingMeasure}
|
||||
>
|
||||
{isDeletingMesure ? "Deleting..." : "Delete"}
|
||||
{isDeletingMeasure ? "Deleting..." : "Delete"}
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
@@ -1905,7 +1905,7 @@ function MesureViewContent({
|
||||
<Card className="mt-4">
|
||||
<CardContent className="pt-6">
|
||||
<div className="prose prose-gray prose-sm md:prose-base text-secondary max-w-3xl">
|
||||
<ReactMarkdown>{data.mesure.description}</ReactMarkdown>
|
||||
<ReactMarkdown>{data.measure.description}</ReactMarkdown>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -1931,20 +1931,20 @@ function MesureViewContent({
|
||||
<TabsTrigger value="controls" className="flex items-center gap-2">
|
||||
<ShieldCheck className="w-4 h-4" />
|
||||
Controls
|
||||
{linkedControlsData?.mesure?.controls?.edges &&
|
||||
linkedControlsData.mesure.controls.edges.length > 0 && (
|
||||
{linkedControlsData?.measure?.controls?.edges &&
|
||||
linkedControlsData.measure.controls.edges.length > 0 && (
|
||||
<span className="ml-1.5 bg-blue-100 text-blue-800 rounded-full text-xs px-2 py-0.5">
|
||||
{linkedControlsData.mesure.controls.edges.length}
|
||||
{linkedControlsData.measure.controls.edges.length}
|
||||
</span>
|
||||
)}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="risks" className="flex items-center gap-2">
|
||||
<AlertTriangle className="w-4 h-4" />
|
||||
Risks
|
||||
{risksData?.mesure?.risks?.edges &&
|
||||
risksData.mesure.risks.edges.length > 0 && (
|
||||
{risksData?.measure?.risks?.edges &&
|
||||
risksData.measure.risks.edges.length > 0 && (
|
||||
<span className="ml-1.5 bg-blue-100 text-blue-800 rounded-full text-xs px-2 py-0.5">
|
||||
{risksData.mesure.risks.edges.length}
|
||||
{risksData.measure.risks.edges.length}
|
||||
</span>
|
||||
)}
|
||||
</TabsTrigger>
|
||||
@@ -1973,10 +1973,10 @@ function MesureViewContent({
|
||||
>
|
||||
<DialogContent className="max-w-3xl max-h-[80vh] overflow-hidden flex flex-col">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Map Mesure to Controls</DialogTitle>
|
||||
<DialogTitle>Map Measure to Controls</DialogTitle>
|
||||
<DialogDescription>
|
||||
Search and select controls to link to this mesure. This
|
||||
helps track which controls are addressed by this mesure.
|
||||
Search and select controls to link to this measure. This
|
||||
helps track which controls are addressed by this measure.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -2125,8 +2125,8 @@ function MesureViewContent({
|
||||
{/* Linked Controls List */}
|
||||
<Card>
|
||||
<CardContent className="p-4">
|
||||
{linkedControlsData?.mesure?.controls?.edges &&
|
||||
linkedControlsData.mesure.controls.edges.length > 0 ? (
|
||||
{linkedControlsData?.measure?.controls?.edges &&
|
||||
linkedControlsData.measure.controls.edges.length > 0 ? (
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
@@ -2174,7 +2174,7 @@ function MesureViewContent({
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-8 text-secondary">
|
||||
No controls linked to this mesure yet. Click "Map to
|
||||
No controls linked to this measure yet. Click "Map to
|
||||
Controls" to link controls.
|
||||
</div>
|
||||
)}
|
||||
@@ -2207,7 +2207,7 @@ function MesureViewContent({
|
||||
<DialogHeader>
|
||||
<DialogTitle>Create New Task</DialogTitle>
|
||||
<DialogDescription>
|
||||
Add a new task to this mesure. Click save when
|
||||
Add a new task to this measure. Click save when
|
||||
you're done.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
@@ -2792,8 +2792,8 @@ function MesureViewContent({
|
||||
|
||||
<Card>
|
||||
<CardContent className="p-4">
|
||||
{risksData?.mesure?.risks?.edges &&
|
||||
risksData.mesure.risks.edges.length > 0 ? (
|
||||
{risksData?.measure?.risks?.edges &&
|
||||
risksData.measure.risks.edges.length > 0 ? (
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
@@ -2813,7 +2813,7 @@ function MesureViewContent({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{risksData.mesure.risks.edges.map(({ node }) => (
|
||||
{risksData.measure.risks.edges.map(({ node }) => (
|
||||
<tr
|
||||
key={node.id}
|
||||
className="border-b hover:bg-invert-bg"
|
||||
@@ -2853,7 +2853,7 @@ function MesureViewContent({
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-8 text-secondary">
|
||||
No risks linked to this mesure yet.
|
||||
No risks linked to this measure yet.
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
@@ -3654,28 +3654,28 @@ function MesureViewContent({
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
{/* Delete Mesure Confirmation Dialog */}
|
||||
<Dialog open={isDeleteMesureOpen} onOpenChange={setIsDeleteMesureOpen}>
|
||||
{/* Delete Measure Confirmation Dialog */}
|
||||
<Dialog open={isDeleteMeasureOpen} onOpenChange={setIsDeleteMeasureOpen}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Delete Mesure</DialogTitle>
|
||||
<DialogTitle>Delete Measure</DialogTitle>
|
||||
<DialogDescription>
|
||||
Are you sure you want to delete this mesure? This action cannot be undone.
|
||||
Are you sure you want to delete this measure? This action cannot be undone.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setIsDeleteMesureOpen(false)}
|
||||
onClick={() => setIsDeleteMeasureOpen(false)}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
variant="destructive"
|
||||
onClick={confirmDeleteMesure}
|
||||
disabled={isDeletingMesure}
|
||||
onClick={confirmDeleteMeasure}
|
||||
disabled={isDeletingMeasure}
|
||||
>
|
||||
{isDeletingMesure ? "Deleting..." : "Delete"}
|
||||
{isDeletingMeasure ? "Deleting..." : "Delete"}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
@@ -3684,24 +3684,24 @@ function MesureViewContent({
|
||||
);
|
||||
}
|
||||
|
||||
export default function MesureView() {
|
||||
const { mesureId } = useParams();
|
||||
export default function MeasureView() {
|
||||
const { measureId } = useParams();
|
||||
const [queryRef, loadQuery] =
|
||||
useQueryLoader<MesureViewQueryType>(mesureViewQuery);
|
||||
useQueryLoader<MeasureViewQueryType>(measureViewQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (mesureId) {
|
||||
loadQuery({ mesureId });
|
||||
if (measureId) {
|
||||
loadQuery({ measureId });
|
||||
}
|
||||
}, [mesureId, loadQuery]);
|
||||
}, [measureId, loadQuery]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <MesureViewSkeleton />;
|
||||
return <MeasureViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<MesureViewSkeleton />}>
|
||||
<MesureViewContent queryRef={queryRef} />
|
||||
<Suspense fallback={<MeasureViewSkeleton />}>
|
||||
<MeasureViewContent queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -4,26 +4,26 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const EditMesureView = lazy(() => import("./EditMesureView"));
|
||||
const NewMeasureView = lazy(() => import("./NewMeasureView"));
|
||||
|
||||
export function EditMesureViewSkeleton() {
|
||||
export function NewMeasureViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Edit Mesure"
|
||||
description="Edit a Mesure. You will be able to link it to control and risks"
|
||||
title="New Measure"
|
||||
description="Add a new measure. You will be able to link it to control and risks"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-subtle-bg rounded-xl animate-pulse" />
|
||||
</PageTemplateSkeleton>
|
||||
);
|
||||
}
|
||||
|
||||
export function EditMesurePage() {
|
||||
export function NewMeasurePage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<EditMesureViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<NewMeasureViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<EditMesureView />
|
||||
<NewMeasureView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -3,20 +3,20 @@ import { ConnectionHandler, graphql, useMutation } from "react-relay";
|
||||
import { useParams, useNavigate } from "react-router";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { NewMesureViewCreateMesureMutation } from "./__generated__/NewMesureViewCreateMesureMutation.graphql";
|
||||
import { NewMeasureViewCreateMeasureMutation } from "./__generated__/NewMeasureViewCreateMeasureMutation.graphql";
|
||||
import { EditableField } from "@/components/EditableField";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const createMesureMutation = graphql`
|
||||
mutation NewMesureViewCreateMesureMutation(
|
||||
$input: CreateMesureInput!
|
||||
const createMeasureMutation = graphql`
|
||||
mutation NewMeasureViewCreateMeasureMutation(
|
||||
$input: CreateMeasureInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createMesure(input: $input) {
|
||||
mesureEdge @prependEdge(connections: $connections) {
|
||||
createMeasure(input: $input) {
|
||||
measureEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
name
|
||||
@@ -27,7 +27,7 @@ const createMesureMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
export default function NewMesureView() {
|
||||
export default function NewMeasureView() {
|
||||
const { organizationId } = useParams<{
|
||||
organizationId: string;
|
||||
}>();
|
||||
@@ -40,7 +40,7 @@ export default function NewMesureView() {
|
||||
});
|
||||
|
||||
const [commit, isInFlight] =
|
||||
useMutation<NewMesureViewCreateMesureMutation>(createMesureMutation);
|
||||
useMutation<NewMeasureViewCreateMeasureMutation>(createMeasureMutation);
|
||||
|
||||
const handleFieldChange = (field: keyof typeof formData, value: unknown) => {
|
||||
setFormData((prev) => ({
|
||||
@@ -63,7 +63,7 @@ export default function NewMesureView() {
|
||||
|
||||
const connectionId = ConnectionHandler.getConnectionID(
|
||||
organizationId!,
|
||||
"MesureListView_mesures"
|
||||
"MeasureListView_measures"
|
||||
);
|
||||
|
||||
commit({
|
||||
@@ -80,7 +80,7 @@ export default function NewMesureView() {
|
||||
if (errors) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: errors[0]?.message || "Failed to create mesure",
|
||||
description: errors[0]?.message || "Failed to create measure",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -88,17 +88,17 @@ export default function NewMesureView() {
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Mesure created successfully",
|
||||
description: "Measure created successfully",
|
||||
});
|
||||
|
||||
navigate(
|
||||
`/organizations/${organizationId}/mesures/${data.createMesure.mesureEdge.node.id}`
|
||||
`/organizations/${organizationId}/measures/${data.createMeasure.measureEdge.node.id}`
|
||||
);
|
||||
},
|
||||
onError(error) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: error.message || "Failed to create mesure",
|
||||
description: error.message || "Failed to create measure",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
@@ -107,8 +107,8 @@ export default function NewMesureView() {
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title="New Mesure"
|
||||
description="Add a new mesure. You will be able to link it to control and risks"
|
||||
title="New Measure"
|
||||
description="Add a new measure. You will be able to link it to control and risks"
|
||||
>
|
||||
<Card className="max-w-2xl">
|
||||
<form onSubmit={handleSubmit} className="p-6 space-y-6">
|
||||
@@ -125,7 +125,7 @@ export default function NewMesureView() {
|
||||
onChange={(value) => handleFieldChange("description", value)}
|
||||
required
|
||||
multiline
|
||||
helpText="Provide a detailed description of the mesure"
|
||||
helpText="Provide a detailed description of the measure"
|
||||
/>
|
||||
|
||||
<EditableField
|
||||
@@ -140,13 +140,13 @@ export default function NewMesureView() {
|
||||
type="button"
|
||||
variant="outline"
|
||||
onClick={() =>
|
||||
navigate(`/organizations/${organizationId}/mesures`)
|
||||
navigate(`/organizations/${organizationId}/measures`)
|
||||
}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isInFlight}>
|
||||
{isInFlight ? "Creating..." : "Create Mesure"}
|
||||
{isInFlight ? "Creating..." : "Create Measure"}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
154
apps/console/src/pages/organizations/measures/__generated__/EditMeasureViewQuery.graphql.ts
generated
Normal file
154
apps/console/src/pages/organizations/measures/__generated__/EditMeasureViewQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,154 @@
|
||||
/**
|
||||
* @generated SignedSource<<ad4cacf2bf1c3df7af8ba9c1418c1503>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EditMeasureViewQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type EditMeasureViewQuery$data = {
|
||||
readonly node: {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type EditMeasureViewQuery = {
|
||||
response: EditMeasureViewQuery$data;
|
||||
variables: EditMeasureViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "EditMeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "EditMeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "d6f22b2f42b5f32ff8a0d199c4cbf1e1",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditMeasureViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query EditMeasureViewQuery(\n $measureId: ID!\n) {\n node(id: $measureId) {\n __typename\n ... on Measure {\n id\n name\n description\n category\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "8aba2561c9078eb149952e1300311516";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* @generated SignedSource<<baa13bd4048002970217bfb1e8017e05>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMeasureInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
id: string;
|
||||
name?: string | null | undefined;
|
||||
state?: MeasureState | null | undefined;
|
||||
};
|
||||
export type EditMeasureViewUpdateMeasureMutation$variables = {
|
||||
input: UpdateMeasureInput;
|
||||
};
|
||||
export type EditMeasureViewUpdateMeasureMutation$data = {
|
||||
readonly updateMeasure: {
|
||||
readonly measure: {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type EditMeasureViewUpdateMeasureMutation = {
|
||||
response: EditMeasureViewUpdateMeasureMutation$data;
|
||||
variables: EditMeasureViewUpdateMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "measure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "EditMeasureViewUpdateMeasureMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "EditMeasureViewUpdateMeasureMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "0d6bab0c03a2c72635e1e42fe69c9551",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditMeasureViewUpdateMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation EditMeasureViewUpdateMeasureMutation(\n $input: UpdateMeasureInput!\n) {\n updateMeasure(input: $input) {\n measure {\n id\n name\n description\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1b91ac6890f48a7f536adcba303f1718";
|
||||
|
||||
export default node;
|
||||
@@ -9,10 +9,10 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EditMesureViewQuery$variables = {
|
||||
mesureId: string;
|
||||
export type EditMeasureViewQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type EditMesureViewQuery$data = {
|
||||
export type EditMeasureViewQuery$data = {
|
||||
readonly node: {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
@@ -20,9 +20,9 @@ export type EditMesureViewQuery$data = {
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type EditMesureViewQuery = {
|
||||
response: EditMesureViewQuery$data;
|
||||
variables: EditMesureViewQuery$variables;
|
||||
export type EditMeasureViewQuery = {
|
||||
response: EditMeasureViewQuery$data;
|
||||
variables: EditMeasureViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -30,14 +30,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "mesureId"
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "mesureId"
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -73,7 +73,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "EditMesureViewQuery",
|
||||
"name": "EditMeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -91,7 +91,7 @@ return {
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -105,7 +105,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "EditMesureViewQuery",
|
||||
"name": "EditMeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -130,7 +130,7 @@ return {
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -142,9 +142,9 @@ return {
|
||||
"cacheID": "3dbf7d90b0ae49ce617abdf063f6b908",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditMesureViewQuery",
|
||||
"name": "EditMeasureViewQuery",
|
||||
"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 }\n id\n }\n}\n"
|
||||
"text": "query EditMeasureViewQuery(\n $measureId: ID!\n) {\n node(id: $measureId) {\n __typename\n ... on Measure {\n id\n name\n description\n category\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,29 +9,29 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMesureInput = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMeasureInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
id: string;
|
||||
name?: string | null | undefined;
|
||||
state?: MesureState | null | undefined;
|
||||
state?: MeasureState | null | undefined;
|
||||
};
|
||||
export type EditMesureViewUpdateMesureMutation$variables = {
|
||||
input: UpdateMesureInput;
|
||||
export type EditMeasureViewUpdateMeasureMutation$variables = {
|
||||
input: UpdateMeasureInput;
|
||||
};
|
||||
export type EditMesureViewUpdateMesureMutation$data = {
|
||||
readonly updateMesure: {
|
||||
readonly mesure: {
|
||||
export type EditMeasureViewUpdateMeasureMutation$data = {
|
||||
readonly updateMeasure: {
|
||||
readonly measure: {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type EditMesureViewUpdateMesureMutation = {
|
||||
response: EditMesureViewUpdateMesureMutation$data;
|
||||
variables: EditMesureViewUpdateMesureMutation$variables;
|
||||
export type EditMeasureViewUpdateMeasureMutation = {
|
||||
response: EditMeasureViewUpdateMeasureMutation$data;
|
||||
variables: EditMeasureViewUpdateMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -52,17 +52,17 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateMesurePayload",
|
||||
"concreteType": "UpdateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateMesure",
|
||||
"name": "updateMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesure",
|
||||
"name": "measure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -98,7 +98,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "EditMesureViewUpdateMesureMutation",
|
||||
"name": "EditMeasureViewUpdateMeasureMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -107,16 +107,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "EditMesureViewUpdateMesureMutation",
|
||||
"name": "EditMeasureViewUpdateMeasureMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ab674147338f145102c150b220578304",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditMesureViewUpdateMesureMutation",
|
||||
"name": "EditMeasureViewUpdateMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation EditMesureViewUpdateMesureMutation(\n $input: UpdateMesureInput!\n) {\n updateMesure(input: $input) {\n mesure {\n id\n name\n description\n }\n }\n}\n"
|
||||
"text": "mutation EditMeasureViewUpdateMeasureMutation(\n $input: UpdateMeasureInput!\n) {\n updateMeasure(input: $input) {\n measure {\n id\n name\n description\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -0,0 +1,208 @@
|
||||
/**
|
||||
* @generated SignedSource<<a93137ce93688a2c3c0986437bf3f4c5>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ImportMeasureInput = {
|
||||
file: any;
|
||||
organizationId: string;
|
||||
};
|
||||
export type MeasureListViewImportMeasureMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: ImportMeasureInput;
|
||||
};
|
||||
export type MeasureListViewImportMeasureMutation$data = {
|
||||
readonly importMeasure: {
|
||||
readonly measureEdges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MeasureState;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
export type MeasureListViewImportMeasureMutation = {
|
||||
response: MeasureListViewImportMeasureMutation$data;
|
||||
variables: MeasureListViewImportMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "measureEdges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureListViewImportMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "ImportMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "importMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureListViewImportMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "ImportMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "importMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "appendEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "measureEdges",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "d257f6fad6ab4c82d2295b7a0342c91b",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureListViewImportMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureListViewImportMeasureMutation(\n $input: ImportMeasureInput!\n) {\n importMeasure(input: $input) {\n measureEdges {\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 = "6649f536c35390d081835f70d1534847";
|
||||
|
||||
export default node;
|
||||
297
apps/console/src/pages/organizations/measures/__generated__/MeasureListViewQuery.graphql.ts
generated
Normal file
297
apps/console/src/pages/organizations/measures/__generated__/MeasureListViewQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,297 @@
|
||||
/**
|
||||
* @generated SignedSource<<fcaed74e4a3e71ef452df09877a2b95c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MeasureListViewQuery$variables = {
|
||||
first?: number | null | undefined;
|
||||
organizationId: string;
|
||||
};
|
||||
export type MeasureListViewQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly measures?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MeasureState;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureListViewQuery = {
|
||||
response: MeasureListViewQuery$data;
|
||||
variables: MeasureListViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "first"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
v6 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "first",
|
||||
"variableName": "first"
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureListViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MeasureListView_measures_connection",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureListViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v6/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MeasureListView_measures",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "measures"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "4d9ad175699f51e62db8923f1dd44ed2",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": "first",
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"organization",
|
||||
"measures"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MeasureListViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureListViewQuery(\n $organizationId: ID!\n $first: Int\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n measures(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 = "2ad3d938b17d57e015272d4296b41f1f";
|
||||
|
||||
export default node;
|
||||
138
apps/console/src/pages/organizations/measures/__generated__/MeasureViewAssignTaskMutation.graphql.ts
generated
Normal file
138
apps/console/src/pages/organizations/measures/__generated__/MeasureViewAssignTaskMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* @generated SignedSource<<132e5315003576c357d64d6aaee4b657>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type AssignTaskInput = {
|
||||
assignedToId: string;
|
||||
taskId: string;
|
||||
};
|
||||
export type MeasureViewAssignTaskMutation$variables = {
|
||||
input: AssignTaskInput;
|
||||
};
|
||||
export type MeasureViewAssignTaskMutation$data = {
|
||||
readonly assignTask: {
|
||||
readonly task: {
|
||||
readonly assignedTo: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
readonly primaryEmailAddress: string;
|
||||
} | null | undefined;
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewAssignTaskMutation = {
|
||||
response: MeasureViewAssignTaskMutation$data;
|
||||
variables: MeasureViewAssignTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "AssignTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "assignTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Task",
|
||||
"kind": "LinkedField",
|
||||
"name": "task",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "assignedTo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "primaryEmailAddress",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewAssignTaskMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewAssignTaskMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ef8536df8f9a92dba371a0f0802d900f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewAssignTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewAssignTaskMutation(\n $input: AssignTaskInput!\n) {\n assignTask(input: $input) {\n task {\n id\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "47ff4e30fd09d661f7dabfd2289bab17";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<aad63785dac93ad7f8db05ee4f219109>>
|
||||
* @generated SignedSource<<441cfaaf785e0628a8c954249ef87bdf>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateControlMesureMappingInput = {
|
||||
export type CreateControlMeasureMappingInput = {
|
||||
controlId: string;
|
||||
mesureId: string;
|
||||
measureId: string;
|
||||
};
|
||||
export type ControlCreateMesureMappingMutation$variables = {
|
||||
input: CreateControlMesureMappingInput;
|
||||
export type MeasureViewCreateControlMappingMutation$variables = {
|
||||
input: CreateControlMeasureMappingInput;
|
||||
};
|
||||
export type ControlCreateMesureMappingMutation$data = {
|
||||
readonly createControlMesureMapping: {
|
||||
export type MeasureViewCreateControlMappingMutation$data = {
|
||||
readonly createControlMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type ControlCreateMesureMappingMutation = {
|
||||
response: ControlCreateMesureMappingMutation$data;
|
||||
variables: ControlCreateMesureMappingMutation$variables;
|
||||
export type MeasureViewCreateControlMappingMutation = {
|
||||
response: MeasureViewCreateControlMappingMutation$data;
|
||||
variables: MeasureViewCreateControlMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,9 +44,9 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "CreateControlMesureMappingPayload",
|
||||
"concreteType": "CreateControlMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createControlMesureMapping",
|
||||
"name": "createControlMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -65,7 +65,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlCreateMesureMappingMutation",
|
||||
"name": "MeasureViewCreateControlMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -74,20 +74,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlCreateMesureMappingMutation",
|
||||
"name": "MeasureViewCreateControlMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "589fad9dec58fb2efe52e8e587c8ce85",
|
||||
"cacheID": "ea74e0148d320dbfb79859bb6286427b",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlCreateMesureMappingMutation",
|
||||
"name": "MeasureViewCreateControlMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlCreateMesureMappingMutation(\n $input: CreateControlMesureMappingInput!\n) {\n createControlMesureMapping(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation MeasureViewCreateControlMappingMutation(\n $input: CreateControlMeasureMappingInput!\n) {\n createControlMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "8974d4f4025f6e1eaba2a6b30e357486";
|
||||
(node as any).hash = "dfe964679c82f9c47d418122595989a8";
|
||||
|
||||
export default node;
|
||||
237
apps/console/src/pages/organizations/measures/__generated__/MeasureViewCreateEvidenceMutation.graphql.ts
generated
Normal file
237
apps/console/src/pages/organizations/measures/__generated__/MeasureViewCreateEvidenceMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* @generated SignedSource<<e5042f900955d846dd86ad6b78d60518>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
||||
export type EvidenceType = "FILE" | "LINK";
|
||||
export type CreateEvidenceInput = {
|
||||
description: string;
|
||||
file?: any | null | undefined;
|
||||
name: string;
|
||||
taskId: string;
|
||||
type: EvidenceType;
|
||||
url?: string | null | undefined;
|
||||
};
|
||||
export type MeasureViewCreateEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateEvidenceInput;
|
||||
};
|
||||
export type MeasureViewCreateEvidenceMutation$data = {
|
||||
readonly createEvidence: {
|
||||
readonly evidenceEdge: {
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly fileUrl: string | null | undefined;
|
||||
readonly filename: string;
|
||||
readonly id: string;
|
||||
readonly mimeType: string;
|
||||
readonly size: number;
|
||||
readonly state: EvidenceState;
|
||||
readonly type: EvidenceType;
|
||||
readonly url: string | null | undefined;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewCreateEvidenceMutation = {
|
||||
response: MeasureViewCreateEvidenceMutation$data;
|
||||
variables: MeasureViewCreateEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "EvidenceEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "evidenceEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Evidence",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "filename",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fileUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "mimeType",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "type",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "url",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "size",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewCreateEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateEvidencePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createEvidence",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewCreateEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateEvidencePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createEvidence",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "appendEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "evidenceEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "25b9947aa09d7b4c60886f149b06cc6e",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewCreateEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewCreateEvidenceMutation(\n $input: CreateEvidenceInput!\n) {\n createEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n description\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "bc59ec67230776eeb60a389a8360b0af";
|
||||
|
||||
export default node;
|
||||
227
apps/console/src/pages/organizations/measures/__generated__/MeasureViewCreateTaskMutation.graphql.ts
generated
Normal file
227
apps/console/src/pages/organizations/measures/__generated__/MeasureViewCreateTaskMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,227 @@
|
||||
/**
|
||||
* @generated SignedSource<<f037ead461a7a59d39f2e98140e4c72f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type CreateTaskInput = {
|
||||
assignedToId?: string | null | undefined;
|
||||
description: string;
|
||||
measureId: string;
|
||||
name: string;
|
||||
timeEstimate?: any | null | undefined;
|
||||
};
|
||||
export type MeasureViewCreateTaskMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateTaskInput;
|
||||
};
|
||||
export type MeasureViewCreateTaskMutation$data = {
|
||||
readonly createTask: {
|
||||
readonly taskEdge: {
|
||||
readonly node: {
|
||||
readonly assignedTo: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
readonly primaryEmailAddress: string;
|
||||
} | null | undefined;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: TaskState;
|
||||
readonly timeEstimate: any | null | undefined;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewCreateTaskMutation = {
|
||||
response: MeasureViewCreateTaskMutation$data;
|
||||
variables: MeasureViewCreateTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TaskEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "taskEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Task",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "timeEstimate",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "assignedTo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "primaryEmailAddress",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewCreateTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewCreateTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "taskEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "53b934e0e7a3d4abf8789ad8672687df",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewCreateTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewCreateTaskMutation(\n $input: CreateTaskInput!\n) {\n createTask(input: $input) {\n taskEdge {\n node {\n id\n name\n description\n timeEstimate\n state\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "0df98f5aee4233dc4ffedcff8256891a";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<272b7b4a8bc0c81baa4a8d8f3656be0c>>
|
||||
* @generated SignedSource<<9136dd4c154f9e4b2ba8b91316edbf4a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteControlMesureMappingInput = {
|
||||
export type DeleteControlMeasureMappingInput = {
|
||||
controlId: string;
|
||||
mesureId: string;
|
||||
measureId: string;
|
||||
};
|
||||
export type ControlDeleteMesureMappingMutation$variables = {
|
||||
input: DeleteControlMesureMappingInput;
|
||||
export type MeasureViewDeleteControlMappingMutation$variables = {
|
||||
input: DeleteControlMeasureMappingInput;
|
||||
};
|
||||
export type ControlDeleteMesureMappingMutation$data = {
|
||||
readonly deleteControlMesureMapping: {
|
||||
export type MeasureViewDeleteControlMappingMutation$data = {
|
||||
readonly deleteControlMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type ControlDeleteMesureMappingMutation = {
|
||||
response: ControlDeleteMesureMappingMutation$data;
|
||||
variables: ControlDeleteMesureMappingMutation$variables;
|
||||
export type MeasureViewDeleteControlMappingMutation = {
|
||||
response: MeasureViewDeleteControlMappingMutation$data;
|
||||
variables: MeasureViewDeleteControlMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,9 +44,9 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "DeleteControlMesureMappingPayload",
|
||||
"concreteType": "DeleteControlMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteControlMesureMapping",
|
||||
"name": "deleteControlMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -65,7 +65,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlDeleteMesureMappingMutation",
|
||||
"name": "MeasureViewDeleteControlMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -74,20 +74,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlDeleteMesureMappingMutation",
|
||||
"name": "MeasureViewDeleteControlMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "66b2b12e57f8a150825f0e3f25494093",
|
||||
"cacheID": "8e779137f0502f324968a4c414bff2e6",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlDeleteMesureMappingMutation",
|
||||
"name": "MeasureViewDeleteControlMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlDeleteMesureMappingMutation(\n $input: DeleteControlMesureMappingInput!\n) {\n deleteControlMesureMapping(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation MeasureViewDeleteControlMappingMutation(\n $input: DeleteControlMeasureMappingInput!\n) {\n deleteControlMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "64e6f03a12a22a87e4893a335e58379b";
|
||||
(node as any).hash = "7c74e8e787022c1c51fbfc38388445e4";
|
||||
|
||||
export default node;
|
||||
132
apps/console/src/pages/organizations/measures/__generated__/MeasureViewDeleteEvidenceMutation.graphql.ts
generated
Normal file
132
apps/console/src/pages/organizations/measures/__generated__/MeasureViewDeleteEvidenceMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<a930baf9c7542b375151433ec7a0bf90>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteEvidenceInput = {
|
||||
evidenceId: string;
|
||||
};
|
||||
export type MeasureViewDeleteEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteEvidenceInput;
|
||||
};
|
||||
export type MeasureViewDeleteEvidenceMutation$data = {
|
||||
readonly deleteEvidence: {
|
||||
readonly deletedEvidenceId: string;
|
||||
};
|
||||
};
|
||||
export type MeasureViewDeleteEvidenceMutation = {
|
||||
response: MeasureViewDeleteEvidenceMutation$data;
|
||||
variables: MeasureViewDeleteEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedEvidenceId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewDeleteEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteEvidencePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteEvidence",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewDeleteEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteEvidencePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteEvidence",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedEvidenceId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "db4b5b4eed57d1361acff9696e8b6667",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewDeleteEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewDeleteEvidenceMutation(\n $input: DeleteEvidenceInput!\n) {\n deleteEvidence(input: $input) {\n deletedEvidenceId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "4281f93d92eb942cd3d0ebbd05d8bd5d";
|
||||
|
||||
export default node;
|
||||
132
apps/console/src/pages/organizations/measures/__generated__/MeasureViewDeleteMeasureMutation.graphql.ts
generated
Normal file
132
apps/console/src/pages/organizations/measures/__generated__/MeasureViewDeleteMeasureMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<eabf44008fc79a4bdd03259111bbf097>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteMeasureInput = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MeasureViewDeleteMeasureMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteMeasureInput;
|
||||
};
|
||||
export type MeasureViewDeleteMeasureMutation$data = {
|
||||
readonly deleteMeasure: {
|
||||
readonly deletedMeasureId: string;
|
||||
};
|
||||
};
|
||||
export type MeasureViewDeleteMeasureMutation = {
|
||||
response: MeasureViewDeleteMeasureMutation$data;
|
||||
variables: MeasureViewDeleteMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedMeasureId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewDeleteMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewDeleteMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedMeasureId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "8369c20d01874393d53f4bcb29b43821",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewDeleteMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewDeleteMeasureMutation(\n $input: DeleteMeasureInput!\n) {\n deleteMeasure(input: $input) {\n deletedMeasureId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e82e708b1d2a39ae3faf6a7be8692b7d";
|
||||
|
||||
export default node;
|
||||
132
apps/console/src/pages/organizations/measures/__generated__/MeasureViewDeleteTaskMutation.graphql.ts
generated
Normal file
132
apps/console/src/pages/organizations/measures/__generated__/MeasureViewDeleteTaskMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<cd8088494f7f5f88d006d90ef72ca8a9>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteTaskInput = {
|
||||
taskId: string;
|
||||
};
|
||||
export type MeasureViewDeleteTaskMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteTaskInput;
|
||||
};
|
||||
export type MeasureViewDeleteTaskMutation$data = {
|
||||
readonly deleteTask: {
|
||||
readonly deletedTaskId: string;
|
||||
};
|
||||
};
|
||||
export type MeasureViewDeleteTaskMutation = {
|
||||
response: MeasureViewDeleteTaskMutation$data;
|
||||
variables: MeasureViewDeleteTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedTaskId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewDeleteTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewDeleteTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedTaskId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f92703409a953a1fea728aeba622c6d5",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewDeleteTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewDeleteTaskMutation(\n $input: DeleteTaskInput!\n) {\n deleteTask(input: $input) {\n deletedTaskId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "dd4f89809cfda8e99ea1a66641c658cb";
|
||||
|
||||
export default node;
|
||||
364
apps/console/src/pages/organizations/measures/__generated__/MeasureViewFrameworksQuery.graphql.ts
generated
Normal file
364
apps/console/src/pages/organizations/measures/__generated__/MeasureViewFrameworksQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,364 @@
|
||||
/**
|
||||
* @generated SignedSource<<f3d959452f28259f74fc44f4c1eedcb2>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureViewFrameworksQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type MeasureViewFrameworksQuery$data = {
|
||||
readonly organization: {
|
||||
readonly frameworks?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly controls: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly referenceId: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
export type MeasureViewFrameworksQuery = {
|
||||
response: MeasureViewFrameworksQuery$data;
|
||||
variables: MeasureViewFrameworksQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "referenceId",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: any*/)
|
||||
],
|
||||
v8 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewFrameworksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "frameworks",
|
||||
"args": null,
|
||||
"concreteType": "FrameworkConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__Organization__frameworks_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "FrameworkEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": "controls",
|
||||
"args": null,
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__Framework__controls_connection",
|
||||
"plural": false,
|
||||
"selections": (v7/*: any*/),
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewFrameworksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v8/*: any*/),
|
||||
"concreteType": "FrameworkConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "frameworks",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "FrameworkEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v8/*: any*/),
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": (v7/*: any*/),
|
||||
"storageKey": "controls(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v8/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "Framework__controls",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "controls"
|
||||
},
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: any*/)
|
||||
],
|
||||
"storageKey": "frameworks(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v8/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "Organization__frameworks",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "frameworks"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f32215939196e9e13f1347b57111f5cb",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": null
|
||||
},
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"organization",
|
||||
"frameworks"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MeasureViewFrameworksQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureViewFrameworksQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n frameworks(first: 100) {\n edges {\n node {\n id\n name\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\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 = "f1183b14c80a91b160f222af00d49b6f";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,235 @@
|
||||
/**
|
||||
* @generated SignedSource<<73ac433b0ba8e4acdf9e0b644ed210ba>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
||||
export type EvidenceType = "FILE" | "LINK";
|
||||
export type FulfillEvidenceInput = {
|
||||
evidenceId: string;
|
||||
file?: any | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
url?: string | null | undefined;
|
||||
};
|
||||
export type MeasureViewFulfillEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: FulfillEvidenceInput;
|
||||
};
|
||||
export type MeasureViewFulfillEvidenceMutation$data = {
|
||||
readonly fulfillEvidence: {
|
||||
readonly evidenceEdge: {
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly fileUrl: string | null | undefined;
|
||||
readonly filename: string;
|
||||
readonly id: string;
|
||||
readonly mimeType: string;
|
||||
readonly size: number;
|
||||
readonly state: EvidenceState;
|
||||
readonly type: EvidenceType;
|
||||
readonly url: string | null | undefined;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewFulfillEvidenceMutation = {
|
||||
response: MeasureViewFulfillEvidenceMutation$data;
|
||||
variables: MeasureViewFulfillEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "EvidenceEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "evidenceEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Evidence",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "filename",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fileUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "mimeType",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "type",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "url",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "size",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewFulfillEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "FulfillEvidencePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "fulfillEvidence",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewFulfillEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "FulfillEvidencePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "fulfillEvidence",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "appendEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "evidenceEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "a87965c67907a386e0fe9d72c02e6f69",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewFulfillEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewFulfillEvidenceMutation(\n $input: FulfillEvidenceInput!\n) {\n fulfillEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n description\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "615288332275b30fa96119676fe366e8";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* @generated SignedSource<<70b5734532ae7cd132a0a4f60de81297>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureViewGetEvidenceFileUrlQuery$variables = {
|
||||
evidenceId: string;
|
||||
};
|
||||
export type MeasureViewGetEvidenceFileUrlQuery$data = {
|
||||
readonly node: {
|
||||
readonly fileUrl?: string | null | undefined;
|
||||
readonly id?: string;
|
||||
};
|
||||
};
|
||||
export type MeasureViewGetEvidenceFileUrlQuery = {
|
||||
response: MeasureViewGetEvidenceFileUrlQuery$data;
|
||||
variables: MeasureViewGetEvidenceFileUrlQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "evidenceId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "evidenceId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fileUrl",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewGetEvidenceFileUrlQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"type": "Evidence",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewGetEvidenceFileUrlQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"type": "Evidence",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "53ad5d32a09d0f4e00e53f3ac7138267",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewGetEvidenceFileUrlQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureViewGetEvidenceFileUrlQuery(\n $evidenceId: ID!\n) {\n node(id: $evidenceId) {\n __typename\n ... on Evidence {\n id\n fileUrl\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e373fc3a6bc7c3c57d253f1915027880";
|
||||
|
||||
export default node;
|
||||
262
apps/console/src/pages/organizations/measures/__generated__/MeasureViewLinkedControlsQuery.graphql.ts
generated
Normal file
262
apps/console/src/pages/organizations/measures/__generated__/MeasureViewLinkedControlsQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,262 @@
|
||||
/**
|
||||
* @generated SignedSource<<9b551f9e8f59a5ffe5c00700cdb59c88>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureViewLinkedControlsQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MeasureViewLinkedControlsQuery$data = {
|
||||
readonly measure: {
|
||||
readonly controls?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly referenceId: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
export type MeasureViewLinkedControlsQuery = {
|
||||
response: MeasureViewLinkedControlsQuery$data;
|
||||
variables: MeasureViewLinkedControlsQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "referenceId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewLinkedControlsQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "controls",
|
||||
"args": null,
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MeasureView_controls_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewLinkedControlsQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": "controls(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MeasureView_controls",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "controls"
|
||||
}
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b4f524eea7ce57decf321b7efacdaa03",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"measure",
|
||||
"controls"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MeasureViewLinkedControlsQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureViewLinkedControlsQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\n description\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "5dfd96b1ab2edc5c8c654346046a968f";
|
||||
|
||||
export default node;
|
||||
267
apps/console/src/pages/organizations/measures/__generated__/MeasureViewOrganizationQuery.graphql.ts
generated
Normal file
267
apps/console/src/pages/organizations/measures/__generated__/MeasureViewOrganizationQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,267 @@
|
||||
/**
|
||||
* @generated SignedSource<<340108b3d5d790eb9e5cf3caa49c2497>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureViewOrganizationQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type MeasureViewOrganizationQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly peoples?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
readonly primaryEmailAddress: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewOrganizationQuery = {
|
||||
response: MeasureViewOrganizationQuery$data;
|
||||
variables: MeasureViewOrganizationQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "FULL_NAME"
|
||||
}
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PeopleEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "primaryEmailAddress",
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
v6 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
},
|
||||
(v3/*: any*/)
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "peoples",
|
||||
"args": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"concreteType": "PeopleConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MeasureView_peoples_connection",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": "__MeasureView_peoples_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": "PeopleConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "peoples",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": "peoples(first:100,orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v6/*: any*/),
|
||||
"filters": [
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "MeasureView_peoples",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "peoples"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "e3e667e3b7336703ac863582368aba65",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"organization",
|
||||
"peoples"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MeasureViewOrganizationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureViewOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "721e50c0d6835692c77ef891af1561c2";
|
||||
|
||||
export default node;
|
||||
508
apps/console/src/pages/organizations/measures/__generated__/MeasureViewQuery.graphql.ts
generated
Normal file
508
apps/console/src/pages/organizations/measures/__generated__/MeasureViewQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,508 @@
|
||||
/**
|
||||
* @generated SignedSource<<63dbc912431a9ea23a2ce515ba95af86>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
||||
export type EvidenceType = "FILE" | "LINK";
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type MeasureViewQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MeasureViewQuery$data = {
|
||||
readonly measure: {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
readonly state?: MeasureState;
|
||||
readonly tasks?: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly assignedTo: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
readonly primaryEmailAddress: string;
|
||||
} | null | undefined;
|
||||
readonly description: string;
|
||||
readonly evidences: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly filename: string;
|
||||
readonly id: string;
|
||||
readonly mimeType: string;
|
||||
readonly size: number;
|
||||
readonly state: EvidenceState;
|
||||
readonly type: EvidenceType;
|
||||
readonly url: string | null | undefined;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: TaskState;
|
||||
readonly timeEstimate: any | null | undefined;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewQuery = {
|
||||
response: MeasureViewQuery$data;
|
||||
variables: MeasureViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "timeEstimate",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "assignedTo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "primaryEmailAddress",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
v13 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "EvidenceEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Evidence",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "mimeType",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "filename",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "size",
|
||||
"storageKey": null
|
||||
},
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "type",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "url",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/),
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
v14 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
],
|
||||
v15 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 50
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"alias": "tasks",
|
||||
"args": null,
|
||||
"concreteType": "TaskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MeasureView_tasks_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TaskEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Task",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
{
|
||||
"alias": "evidences",
|
||||
"args": null,
|
||||
"concreteType": "EvidenceConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MeasureView_evidences_connection",
|
||||
"plural": false,
|
||||
"selections": (v13/*: any*/),
|
||||
"storageKey": null
|
||||
},
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v9/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"concreteType": "TaskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "tasks",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TaskEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Task",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"concreteType": "EvidenceConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "evidences",
|
||||
"plural": false,
|
||||
"selections": (v13/*: any*/),
|
||||
"storageKey": "evidences(first:50)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MeasureView_evidences",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "evidences"
|
||||
},
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
"storageKey": "tasks(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MeasureView_tasks",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "tasks"
|
||||
}
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "9c4b0f0032102448259ea5deb2b9d57a",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": null
|
||||
},
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"measure",
|
||||
"tasks"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MeasureViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureViewQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\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 = "0de1c02cbaf76feae0ecdbd93f530fa7";
|
||||
|
||||
export default node;
|
||||
318
apps/console/src/pages/organizations/measures/__generated__/MeasureViewRisksQuery.graphql.ts
generated
Normal file
318
apps/console/src/pages/organizations/measures/__generated__/MeasureViewRisksQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,318 @@
|
||||
/**
|
||||
* @generated SignedSource<<f1eccfbde625d131166d0fac7f4613aa>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureViewRisksQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MeasureViewRisksQuery$data = {
|
||||
readonly measure: {
|
||||
readonly id: string;
|
||||
readonly risks?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly inherentImpact: number;
|
||||
readonly inherentLikelihood: number;
|
||||
readonly inherentSeverity: number;
|
||||
readonly name: string;
|
||||
readonly residualImpact: number;
|
||||
readonly residualLikelihood: number;
|
||||
readonly residualSeverity: number;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewRisksQuery = {
|
||||
response: MeasureViewRisksQuery$data;
|
||||
variables: MeasureViewRisksQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "RiskEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Risk",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "inherentLikelihood",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "inherentImpact",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "inherentSeverity",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "residualLikelihood",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "residualImpact",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "residualSeverity",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewRisksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "risks",
|
||||
"args": null,
|
||||
"concreteType": "RiskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MeasureView_risks_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewRisksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "RiskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "risks",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": "risks(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MeasureView_risks",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "risks"
|
||||
}
|
||||
],
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "e0a3387051cf8312a5ac831f1a9012df",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"measure",
|
||||
"risks"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MeasureViewRisksQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MeasureViewRisksQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\n risks(first: 100) {\n edges {\n node {\n id\n name\n description\n inherentLikelihood\n inherentImpact\n inherentSeverity\n residualLikelihood\n residualImpact\n residualSeverity\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 = "22056b7f008dc87a4ad410bacac9a838";
|
||||
|
||||
export default node;
|
||||
137
apps/console/src/pages/organizations/measures/__generated__/MeasureViewUnassignTaskMutation.graphql.ts
generated
Normal file
137
apps/console/src/pages/organizations/measures/__generated__/MeasureViewUnassignTaskMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* @generated SignedSource<<681f6e4cd3a8dc325d74472b475df8cf>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type UnassignTaskInput = {
|
||||
taskId: string;
|
||||
};
|
||||
export type MeasureViewUnassignTaskMutation$variables = {
|
||||
input: UnassignTaskInput;
|
||||
};
|
||||
export type MeasureViewUnassignTaskMutation$data = {
|
||||
readonly unassignTask: {
|
||||
readonly task: {
|
||||
readonly assignedTo: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
readonly primaryEmailAddress: string;
|
||||
} | null | undefined;
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewUnassignTaskMutation = {
|
||||
response: MeasureViewUnassignTaskMutation$data;
|
||||
variables: MeasureViewUnassignTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UnassignTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "unassignTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Task",
|
||||
"kind": "LinkedField",
|
||||
"name": "task",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "assignedTo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "primaryEmailAddress",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewUnassignTaskMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewUnassignTaskMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "656f852f9ff5fa12a239a31652369278",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewUnassignTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewUnassignTaskMutation(\n $input: UnassignTaskInput!\n) {\n unassignTask(input: $input) {\n task {\n id\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "66c29432bc00748955eb5793105ff03b";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,118 @@
|
||||
/**
|
||||
* @generated SignedSource<<5c3c644d4844322b34c5fbee967880a8>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMeasureInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
id: string;
|
||||
name?: string | null | undefined;
|
||||
state?: MeasureState | null | undefined;
|
||||
};
|
||||
export type MeasureViewUpdateMeasureStateMutation$variables = {
|
||||
input: UpdateMeasureInput;
|
||||
};
|
||||
export type MeasureViewUpdateMeasureStateMutation$data = {
|
||||
readonly updateMeasure: {
|
||||
readonly measure: {
|
||||
readonly id: string;
|
||||
readonly state: MeasureState;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewUpdateMeasureStateMutation = {
|
||||
response: MeasureViewUpdateMeasureStateMutation$data;
|
||||
variables: MeasureViewUpdateMeasureStateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "measure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewUpdateMeasureStateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewUpdateMeasureStateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "0b67944fab3e9ae13f437aeee2b28c5b",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewUpdateMeasureStateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewUpdateMeasureStateMutation(\n $input: UpdateMeasureInput!\n) {\n updateMeasure(input: $input) {\n measure {\n id\n state\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "d89e0bc25930592a1f723bbbdb3c43b8";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* @generated SignedSource<<1595fa9771d6baa14534b181f4a1384a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type UpdateTaskInput = {
|
||||
description?: string | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
state?: TaskState | null | undefined;
|
||||
taskId: string;
|
||||
timeEstimate?: any | null | undefined;
|
||||
};
|
||||
export type MeasureViewUpdateTaskStateMutation$variables = {
|
||||
input: UpdateTaskInput;
|
||||
};
|
||||
export type MeasureViewUpdateTaskStateMutation$data = {
|
||||
readonly updateTask: {
|
||||
readonly task: {
|
||||
readonly id: string;
|
||||
readonly state: TaskState;
|
||||
readonly timeEstimate: any | null | undefined;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MeasureViewUpdateTaskStateMutation = {
|
||||
response: MeasureViewUpdateTaskStateMutation$data;
|
||||
variables: MeasureViewUpdateTaskStateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateTaskPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateTask",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Task",
|
||||
"kind": "LinkedField",
|
||||
"name": "task",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "timeEstimate",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MeasureViewUpdateTaskStateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MeasureViewUpdateTaskStateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f545a0b12edb8f231a1a7a7c38b6e905",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MeasureViewUpdateTaskStateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MeasureViewUpdateTaskStateMutation(\n $input: UpdateTaskInput!\n) {\n updateTask(input: $input) {\n task {\n id\n state\n timeEstimate\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e1d67c030523e56d6bcd595c27fcb3dc";
|
||||
|
||||
export default node;
|
||||
@@ -9,33 +9,33 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ImportMesureInput = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ImportMeasureInput = {
|
||||
file: any;
|
||||
organizationId: string;
|
||||
};
|
||||
export type MesureListViewImportMesureMutation$variables = {
|
||||
export type MeasureListViewImportMeasureMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: ImportMesureInput;
|
||||
input: ImportMeasureInput;
|
||||
};
|
||||
export type MesureListViewImportMesureMutation$data = {
|
||||
readonly importMesure: {
|
||||
readonly mesureEdges: ReadonlyArray<{
|
||||
export type MeasureListViewImportMeasureMutation$data = {
|
||||
readonly importMeasure: {
|
||||
readonly measureEdges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
export type MesureListViewImportMesureMutation = {
|
||||
response: MesureListViewImportMesureMutation$data;
|
||||
variables: MesureListViewImportMesureMutation$variables;
|
||||
export type MeasureListViewImportMeasureMutation = {
|
||||
response: MeasureListViewImportMeasureMutation$data;
|
||||
variables: MeasureListViewImportMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,15 +59,15 @@ v2 = [
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesureEdges",
|
||||
"name": "measureEdges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -135,14 +135,14 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureListViewImportMesureMutation",
|
||||
"name": "MeasureListViewImportMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "ImportMesurePayload",
|
||||
"concreteType": "ImportMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "importMesure",
|
||||
"name": "importMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
@@ -160,14 +160,14 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureListViewImportMesureMutation",
|
||||
"name": "MeasureListViewImportMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "ImportMesurePayload",
|
||||
"concreteType": "ImportMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "importMesure",
|
||||
"name": "importMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
@@ -178,7 +178,7 @@ return {
|
||||
"handle": "appendEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesureEdges",
|
||||
"name": "measureEdges",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
@@ -196,9 +196,9 @@ return {
|
||||
"cacheID": "8cf2772dcac48b487c892d2b68a3bb51",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureListViewImportMesureMutation",
|
||||
"name": "MeasureListViewImportMeasureMutation",
|
||||
"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 createdAt\n updatedAt\n }\n }\n }\n}\n"
|
||||
"text": "mutation MeasureListViewImportMeasureMutation(\n $input: ImportMeasureInput!\n) {\n importMeasure(input: $input) {\n measureEdges {\n node {\n id\n name\n description\n category\n state\n createdAt\n updatedAt\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,15 +9,15 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MesureListViewQuery$variables = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MeasureListViewQuery$variables = {
|
||||
first?: number | null | undefined;
|
||||
organizationId: string;
|
||||
};
|
||||
export type MesureListViewQuery$data = {
|
||||
export type MeasureListViewQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly mesures?: {
|
||||
readonly measures?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
@@ -25,16 +25,16 @@ export type MesureListViewQuery$data = {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureListViewQuery = {
|
||||
response: MesureListViewQuery$data;
|
||||
variables: MesureListViewQuery$variables;
|
||||
export type MeasureListViewQuery = {
|
||||
response: MeasureListViewQuery$data;
|
||||
variables: MeasureListViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -73,7 +73,7 @@ v5 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -81,7 +81,7 @@ v5 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -184,7 +184,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureListViewQuery",
|
||||
"name": "MeasureListViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -199,11 +199,11 @@ return {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesures",
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureListView_mesures_connection",
|
||||
"name": "__MeasureListView_measures_connection",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -226,7 +226,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureListViewQuery",
|
||||
"name": "MeasureListViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -244,9 +244,9 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -256,9 +256,9 @@ return {
|
||||
"args": (v6/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureListView_mesures",
|
||||
"key": "MeasureListView_measures",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesures"
|
||||
"name": "measures"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
@@ -280,14 +280,14 @@ return {
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"organization",
|
||||
"mesures"
|
||||
"measures"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MesureListViewQuery",
|
||||
"name": "MeasureListViewQuery",
|
||||
"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 createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query MeasureListViewQuery(\n $organizationId: ID!\n $first: Int\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n measures(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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -13,10 +13,10 @@ export type AssignTaskInput = {
|
||||
assignedToId: string;
|
||||
taskId: string;
|
||||
};
|
||||
export type MesureViewAssignTaskMutation$variables = {
|
||||
export type MeasureViewAssignTaskMutation$variables = {
|
||||
input: AssignTaskInput;
|
||||
};
|
||||
export type MesureViewAssignTaskMutation$data = {
|
||||
export type MeasureViewAssignTaskMutation$data = {
|
||||
readonly assignTask: {
|
||||
readonly task: {
|
||||
readonly assignedTo: {
|
||||
@@ -28,9 +28,9 @@ export type MesureViewAssignTaskMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewAssignTaskMutation = {
|
||||
response: MesureViewAssignTaskMutation$data;
|
||||
variables: MesureViewAssignTaskMutation$variables;
|
||||
export type MeasureViewAssignTaskMutation = {
|
||||
response: MeasureViewAssignTaskMutation$data;
|
||||
variables: MeasureViewAssignTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -110,7 +110,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewAssignTaskMutation",
|
||||
"name": "MeasureViewAssignTaskMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -119,16 +119,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewAssignTaskMutation",
|
||||
"name": "MeasureViewAssignTaskMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "6d3f95b9e223f40d7e333b951193abcc",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewAssignTaskMutation",
|
||||
"name": "MeasureViewAssignTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewAssignTaskMutation(\n $input: AssignTaskInput!\n) {\n assignTask(input: $input) {\n task {\n id\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewAssignTaskMutation(\n $input: AssignTaskInput!\n) {\n assignTask(input: $input) {\n task {\n id\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateControlMesureMappingInput = {
|
||||
export type CreateControlMeasureMappingInput = {
|
||||
controlId: string;
|
||||
mesureId: string;
|
||||
measureId: string;
|
||||
};
|
||||
export type MesureViewCreateControlMappingMutation$variables = {
|
||||
input: CreateControlMesureMappingInput;
|
||||
export type MeasureViewCreateControlMappingMutation$variables = {
|
||||
input: CreateControlMeasureMappingInput;
|
||||
};
|
||||
export type MesureViewCreateControlMappingMutation$data = {
|
||||
readonly createControlMesureMapping: {
|
||||
export type MeasureViewCreateControlMappingMutation$data = {
|
||||
readonly createControlMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type MesureViewCreateControlMappingMutation = {
|
||||
response: MesureViewCreateControlMappingMutation$data;
|
||||
variables: MesureViewCreateControlMappingMutation$variables;
|
||||
export type MeasureViewCreateControlMappingMutation = {
|
||||
response: MeasureViewCreateControlMappingMutation$data;
|
||||
variables: MeasureViewCreateControlMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,9 +44,9 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "CreateControlMesureMappingPayload",
|
||||
"concreteType": "CreateControlMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createControlMesureMapping",
|
||||
"name": "createControlMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -65,7 +65,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewCreateControlMappingMutation",
|
||||
"name": "MeasureViewCreateControlMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -74,16 +74,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewCreateControlMappingMutation",
|
||||
"name": "MeasureViewCreateControlMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "78c1205d1a787ee2cc4e1173e3ef463f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewCreateControlMappingMutation",
|
||||
"name": "MeasureViewCreateControlMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewCreateControlMappingMutation(\n $input: CreateControlMesureMappingInput!\n) {\n createControlMesureMapping(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation MeasureViewCreateControlMappingMutation(\n $input: CreateControlMeasureMappingInput!\n) {\n createControlMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -19,11 +19,11 @@ export type CreateEvidenceInput = {
|
||||
type: EvidenceType;
|
||||
url?: string | null | undefined;
|
||||
};
|
||||
export type MesureViewCreateEvidenceMutation$variables = {
|
||||
export type MeasureViewCreateEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateEvidenceInput;
|
||||
};
|
||||
export type MesureViewCreateEvidenceMutation$data = {
|
||||
export type MeasureViewCreateEvidenceMutation$data = {
|
||||
readonly createEvidence: {
|
||||
readonly evidenceEdge: {
|
||||
readonly node: {
|
||||
@@ -41,9 +41,9 @@ export type MesureViewCreateEvidenceMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewCreateEvidenceMutation = {
|
||||
response: MesureViewCreateEvidenceMutation$data;
|
||||
variables: MesureViewCreateEvidenceMutation$variables;
|
||||
export type MeasureViewCreateEvidenceMutation = {
|
||||
response: MeasureViewCreateEvidenceMutation$data;
|
||||
variables: MeasureViewCreateEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -164,7 +164,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewCreateEvidenceMutation",
|
||||
"name": "MeasureViewCreateEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -189,7 +189,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewCreateEvidenceMutation",
|
||||
"name": "MeasureViewCreateEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -225,9 +225,9 @@ return {
|
||||
"cacheID": "550cd90cddee628ec42ebd53ac749af0",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewCreateEvidenceMutation",
|
||||
"name": "MeasureViewCreateEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewCreateEvidenceMutation(\n $input: CreateEvidenceInput!\n) {\n createEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n description\n }\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewCreateEvidenceMutation(\n $input: CreateEvidenceInput!\n) {\n createEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n description\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -13,15 +13,15 @@ export type TaskState = "DONE" | "TODO";
|
||||
export type CreateTaskInput = {
|
||||
assignedToId?: string | null | undefined;
|
||||
description: string;
|
||||
mesureId: string;
|
||||
measureId: string;
|
||||
name: string;
|
||||
timeEstimate?: any | null | undefined;
|
||||
};
|
||||
export type MesureViewCreateTaskMutation$variables = {
|
||||
export type MeasureViewCreateTaskMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateTaskInput;
|
||||
};
|
||||
export type MesureViewCreateTaskMutation$data = {
|
||||
export type MeasureViewCreateTaskMutation$data = {
|
||||
readonly createTask: {
|
||||
readonly taskEdge: {
|
||||
readonly node: {
|
||||
@@ -39,9 +39,9 @@ export type MesureViewCreateTaskMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewCreateTaskMutation = {
|
||||
response: MesureViewCreateTaskMutation$data;
|
||||
variables: MesureViewCreateTaskMutation$variables;
|
||||
export type MeasureViewCreateTaskMutation = {
|
||||
response: MeasureViewCreateTaskMutation$data;
|
||||
variables: MeasureViewCreateTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -154,7 +154,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewCreateTaskMutation",
|
||||
"name": "MeasureViewCreateTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -179,7 +179,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewCreateTaskMutation",
|
||||
"name": "MeasureViewCreateTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -215,9 +215,9 @@ return {
|
||||
"cacheID": "453cd7da016798ce86c012c9d1cf29f1",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewCreateTaskMutation",
|
||||
"name": "MeasureViewCreateTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewCreateTaskMutation(\n $input: CreateTaskInput!\n) {\n createTask(input: $input) {\n taskEdge {\n node {\n id\n name\n description\n timeEstimate\n state\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewCreateTaskMutation(\n $input: CreateTaskInput!\n) {\n createTask(input: $input) {\n taskEdge {\n node {\n id\n name\n description\n timeEstimate\n state\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteControlMesureMappingInput = {
|
||||
export type DeleteControlMeasureMappingInput = {
|
||||
controlId: string;
|
||||
mesureId: string;
|
||||
measureId: string;
|
||||
};
|
||||
export type MesureViewDeleteControlMappingMutation$variables = {
|
||||
input: DeleteControlMesureMappingInput;
|
||||
export type MeasureViewDeleteControlMappingMutation$variables = {
|
||||
input: DeleteControlMeasureMappingInput;
|
||||
};
|
||||
export type MesureViewDeleteControlMappingMutation$data = {
|
||||
readonly deleteControlMesureMapping: {
|
||||
export type MeasureViewDeleteControlMappingMutation$data = {
|
||||
readonly deleteControlMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type MesureViewDeleteControlMappingMutation = {
|
||||
response: MesureViewDeleteControlMappingMutation$data;
|
||||
variables: MesureViewDeleteControlMappingMutation$variables;
|
||||
export type MeasureViewDeleteControlMappingMutation = {
|
||||
response: MeasureViewDeleteControlMappingMutation$data;
|
||||
variables: MeasureViewDeleteControlMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,9 +44,9 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "DeleteControlMesureMappingPayload",
|
||||
"concreteType": "DeleteControlMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteControlMesureMapping",
|
||||
"name": "deleteControlMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -65,7 +65,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewDeleteControlMappingMutation",
|
||||
"name": "MeasureViewDeleteControlMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -74,16 +74,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewDeleteControlMappingMutation",
|
||||
"name": "MeasureViewDeleteControlMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "5293df3ec3b7a9c5dab1ae7c41177186",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewDeleteControlMappingMutation",
|
||||
"name": "MeasureViewDeleteControlMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewDeleteControlMappingMutation(\n $input: DeleteControlMesureMappingInput!\n) {\n deleteControlMesureMapping(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation MeasureViewDeleteControlMappingMutation(\n $input: DeleteControlMeasureMappingInput!\n) {\n deleteControlMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -12,18 +12,18 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteEvidenceInput = {
|
||||
evidenceId: string;
|
||||
};
|
||||
export type MesureViewDeleteEvidenceMutation$variables = {
|
||||
export type MeasureViewDeleteEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteEvidenceInput;
|
||||
};
|
||||
export type MesureViewDeleteEvidenceMutation$data = {
|
||||
export type MeasureViewDeleteEvidenceMutation$data = {
|
||||
readonly deleteEvidence: {
|
||||
readonly deletedEvidenceId: string;
|
||||
};
|
||||
};
|
||||
export type MesureViewDeleteEvidenceMutation = {
|
||||
response: MesureViewDeleteEvidenceMutation$data;
|
||||
variables: MesureViewDeleteEvidenceMutation$variables;
|
||||
export type MeasureViewDeleteEvidenceMutation = {
|
||||
response: MeasureViewDeleteEvidenceMutation$data;
|
||||
variables: MeasureViewDeleteEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,7 +59,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewDeleteEvidenceMutation",
|
||||
"name": "MeasureViewDeleteEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -84,7 +84,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewDeleteEvidenceMutation",
|
||||
"name": "MeasureViewDeleteEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -120,9 +120,9 @@ return {
|
||||
"cacheID": "26fbd71aca06943318c6154a0079d6d7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewDeleteEvidenceMutation",
|
||||
"name": "MeasureViewDeleteEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewDeleteEvidenceMutation(\n $input: DeleteEvidenceInput!\n) {\n deleteEvidence(input: $input) {\n deletedEvidenceId\n }\n}\n"
|
||||
"text": "mutation MeasureViewDeleteEvidenceMutation(\n $input: DeleteEvidenceInput!\n) {\n deleteEvidence(input: $input) {\n deletedEvidenceId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,21 +9,21 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteMesureInput = {
|
||||
mesureId: string;
|
||||
export type DeleteMeasureInput = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MesureViewDeleteMesureMutation$variables = {
|
||||
export type MeasureViewDeleteMeasureMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteMesureInput;
|
||||
input: DeleteMeasureInput;
|
||||
};
|
||||
export type MesureViewDeleteMesureMutation$data = {
|
||||
readonly deleteMesure: {
|
||||
readonly deletedMesureId: string;
|
||||
export type MeasureViewDeleteMeasureMutation$data = {
|
||||
readonly deleteMeasure: {
|
||||
readonly deletedMeasureId: string;
|
||||
};
|
||||
};
|
||||
export type MesureViewDeleteMesureMutation = {
|
||||
response: MesureViewDeleteMesureMutation$data;
|
||||
variables: MesureViewDeleteMesureMutation$variables;
|
||||
export type MeasureViewDeleteMeasureMutation = {
|
||||
response: MeasureViewDeleteMeasureMutation$data;
|
||||
variables: MeasureViewDeleteMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -48,7 +48,7 @@ v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedMesureId",
|
||||
"name": "deletedMeasureId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
@@ -59,14 +59,14 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewDeleteMesureMutation",
|
||||
"name": "MeasureViewDeleteMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteMesurePayload",
|
||||
"concreteType": "DeleteMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteMesure",
|
||||
"name": "deleteMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
@@ -84,14 +84,14 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewDeleteMesureMutation",
|
||||
"name": "MeasureViewDeleteMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteMesurePayload",
|
||||
"concreteType": "DeleteMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteMesure",
|
||||
"name": "deleteMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
@@ -102,7 +102,7 @@ return {
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedMesureId",
|
||||
"name": "deletedMeasureId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
@@ -120,9 +120,9 @@ return {
|
||||
"cacheID": "075b3e2d23906985e70fa5ccd3b623c7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewDeleteMesureMutation",
|
||||
"name": "MeasureViewDeleteMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewDeleteMesureMutation(\n $input: DeleteMesureInput!\n) {\n deleteMesure(input: $input) {\n deletedMesureId\n }\n}\n"
|
||||
"text": "mutation MeasureViewDeleteMeasureMutation(\n $input: DeleteMeasureInput!\n) {\n deleteMeasure(input: $input) {\n deletedMeasureId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -12,18 +12,18 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteTaskInput = {
|
||||
taskId: string;
|
||||
};
|
||||
export type MesureViewDeleteTaskMutation$variables = {
|
||||
export type MeasureViewDeleteTaskMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteTaskInput;
|
||||
};
|
||||
export type MesureViewDeleteTaskMutation$data = {
|
||||
export type MeasureViewDeleteTaskMutation$data = {
|
||||
readonly deleteTask: {
|
||||
readonly deletedTaskId: string;
|
||||
};
|
||||
};
|
||||
export type MesureViewDeleteTaskMutation = {
|
||||
response: MesureViewDeleteTaskMutation$data;
|
||||
variables: MesureViewDeleteTaskMutation$variables;
|
||||
export type MeasureViewDeleteTaskMutation = {
|
||||
response: MeasureViewDeleteTaskMutation$data;
|
||||
variables: MeasureViewDeleteTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,7 +59,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewDeleteTaskMutation",
|
||||
"name": "MeasureViewDeleteTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -84,7 +84,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewDeleteTaskMutation",
|
||||
"name": "MeasureViewDeleteTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -120,9 +120,9 @@ return {
|
||||
"cacheID": "a5096acddc7796fbc89521cc80b5538e",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewDeleteTaskMutation",
|
||||
"name": "MeasureViewDeleteTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewDeleteTaskMutation(\n $input: DeleteTaskInput!\n) {\n deleteTask(input: $input) {\n deletedTaskId\n }\n}\n"
|
||||
"text": "mutation MeasureViewDeleteTaskMutation(\n $input: DeleteTaskInput!\n) {\n deleteTask(input: $input) {\n deletedTaskId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,10 +9,10 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureViewFrameworksQuery$variables = {
|
||||
export type MeasureViewFrameworksQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type MesureViewFrameworksQuery$data = {
|
||||
export type MeasureViewFrameworksQuery$data = {
|
||||
readonly organization: {
|
||||
readonly frameworks?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
@@ -35,9 +35,9 @@ export type MesureViewFrameworksQuery$data = {
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
export type MesureViewFrameworksQuery = {
|
||||
response: MesureViewFrameworksQuery$data;
|
||||
variables: MesureViewFrameworksQuery$variables;
|
||||
export type MeasureViewFrameworksQuery = {
|
||||
response: MeasureViewFrameworksQuery$data;
|
||||
variables: MeasureViewFrameworksQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -163,7 +163,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewFrameworksQuery",
|
||||
"name": "MeasureViewFrameworksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -240,7 +240,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewFrameworksQuery",
|
||||
"name": "MeasureViewFrameworksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -352,9 +352,9 @@ return {
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MesureViewFrameworksQuery",
|
||||
"name": "MeasureViewFrameworksQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MesureViewFrameworksQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n frameworks(first: 100) {\n edges {\n node {\n id\n name\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\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 MeasureViewFrameworksQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n frameworks(first: 100) {\n edges {\n node {\n id\n name\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -17,11 +17,11 @@ export type FulfillEvidenceInput = {
|
||||
name?: string | null | undefined;
|
||||
url?: string | null | undefined;
|
||||
};
|
||||
export type MesureViewFulfillEvidenceMutation$variables = {
|
||||
export type MeasureViewFulfillEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: FulfillEvidenceInput;
|
||||
};
|
||||
export type MesureViewFulfillEvidenceMutation$data = {
|
||||
export type MeasureViewFulfillEvidenceMutation$data = {
|
||||
readonly fulfillEvidence: {
|
||||
readonly evidenceEdge: {
|
||||
readonly node: {
|
||||
@@ -39,9 +39,9 @@ export type MesureViewFulfillEvidenceMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewFulfillEvidenceMutation = {
|
||||
response: MesureViewFulfillEvidenceMutation$data;
|
||||
variables: MesureViewFulfillEvidenceMutation$variables;
|
||||
export type MeasureViewFulfillEvidenceMutation = {
|
||||
response: MeasureViewFulfillEvidenceMutation$data;
|
||||
variables: MeasureViewFulfillEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -162,7 +162,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewFulfillEvidenceMutation",
|
||||
"name": "MeasureViewFulfillEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -187,7 +187,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewFulfillEvidenceMutation",
|
||||
"name": "MeasureViewFulfillEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -223,9 +223,9 @@ return {
|
||||
"cacheID": "605c054b1e501d03ded168635513d859",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewFulfillEvidenceMutation",
|
||||
"name": "MeasureViewFulfillEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewFulfillEvidenceMutation(\n $input: FulfillEvidenceInput!\n) {\n fulfillEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n description\n }\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewFulfillEvidenceMutation(\n $input: FulfillEvidenceInput!\n) {\n fulfillEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n description\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureViewGetEvidenceFileUrlQuery$variables = {
|
||||
export type MeasureViewGetEvidenceFileUrlQuery$variables = {
|
||||
evidenceId: string;
|
||||
};
|
||||
export type MesureViewGetEvidenceFileUrlQuery$data = {
|
||||
export type MeasureViewGetEvidenceFileUrlQuery$data = {
|
||||
readonly node: {
|
||||
readonly fileUrl?: string | null | undefined;
|
||||
readonly id?: string;
|
||||
};
|
||||
};
|
||||
export type MesureViewGetEvidenceFileUrlQuery = {
|
||||
response: MesureViewGetEvidenceFileUrlQuery$data;
|
||||
variables: MesureViewGetEvidenceFileUrlQuery$variables;
|
||||
export type MeasureViewGetEvidenceFileUrlQuery = {
|
||||
response: MeasureViewGetEvidenceFileUrlQuery$data;
|
||||
variables: MeasureViewGetEvidenceFileUrlQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -57,7 +57,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewGetEvidenceFileUrlQuery",
|
||||
"name": "MeasureViewGetEvidenceFileUrlQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewGetEvidenceFileUrlQuery",
|
||||
"name": "MeasureViewGetEvidenceFileUrlQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -122,9 +122,9 @@ return {
|
||||
"cacheID": "05edf89cc90a90e1a96bd02f8448b629",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewGetEvidenceFileUrlQuery",
|
||||
"name": "MeasureViewGetEvidenceFileUrlQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MesureViewGetEvidenceFileUrlQuery(\n $evidenceId: ID!\n) {\n node(id: $evidenceId) {\n __typename\n ... on Evidence {\n id\n fileUrl\n }\n id\n }\n}\n"
|
||||
"text": "query MeasureViewGetEvidenceFileUrlQuery(\n $evidenceId: ID!\n) {\n node(id: $evidenceId) {\n __typename\n ... on Evidence {\n id\n fileUrl\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,11 +9,11 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureViewLinkedControlsQuery$variables = {
|
||||
mesureId: string;
|
||||
export type MeasureViewLinkedControlsQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MesureViewLinkedControlsQuery$data = {
|
||||
readonly mesure: {
|
||||
export type MeasureViewLinkedControlsQuery$data = {
|
||||
readonly measure: {
|
||||
readonly controls?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
@@ -27,9 +27,9 @@ export type MesureViewLinkedControlsQuery$data = {
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
export type MesureViewLinkedControlsQuery = {
|
||||
response: MesureViewLinkedControlsQuery$data;
|
||||
variables: MesureViewLinkedControlsQuery$variables;
|
||||
export type MeasureViewLinkedControlsQuery = {
|
||||
response: MeasureViewLinkedControlsQuery$data;
|
||||
variables: MeasureViewLinkedControlsQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -37,14 +37,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "mesureId"
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "mesureId"
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -152,10 +152,10 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewLinkedControlsQuery",
|
||||
"name": "MeasureViewLinkedControlsQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -171,13 +171,13 @@ return {
|
||||
"args": null,
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureView_controls_connection",
|
||||
"name": "__MeasureView_controls_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -191,10 +191,10 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewLinkedControlsQuery",
|
||||
"name": "MeasureViewLinkedControlsQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -221,12 +221,12 @@ return {
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureView_controls",
|
||||
"key": "MeasureView_controls",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "controls"
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -244,15 +244,15 @@ return {
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"mesure",
|
||||
"measure",
|
||||
"controls"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MesureViewLinkedControlsQuery",
|
||||
"name": "MeasureViewLinkedControlsQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MesureViewLinkedControlsQuery(\n $mesureId: ID!\n) {\n mesure: node(id: $mesureId) {\n __typename\n id\n ... on Mesure {\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\n description\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query MeasureViewLinkedControlsQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\n description\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,10 +9,10 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureViewOrganizationQuery$variables = {
|
||||
export type MeasureViewOrganizationQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type MesureViewOrganizationQuery$data = {
|
||||
export type MeasureViewOrganizationQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly peoples?: {
|
||||
@@ -26,9 +26,9 @@ export type MesureViewOrganizationQuery$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewOrganizationQuery = {
|
||||
response: MesureViewOrganizationQuery$data;
|
||||
variables: MesureViewOrganizationQuery$variables;
|
||||
export type MeasureViewOrganizationQuery = {
|
||||
response: MeasureViewOrganizationQuery$data;
|
||||
variables: MeasureViewOrganizationQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -153,7 +153,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewOrganizationQuery",
|
||||
"name": "MeasureViewOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -174,10 +174,10 @@ return {
|
||||
],
|
||||
"concreteType": "PeopleConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureView_peoples_connection",
|
||||
"name": "__MeasureView_peoples_connection",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": "__MesureView_peoples_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
"storageKey": "__MeasureView_peoples_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
@@ -194,7 +194,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewOrganizationQuery",
|
||||
"name": "MeasureViewOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -226,7 +226,7 @@ return {
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "MesureView_peoples",
|
||||
"key": "MeasureView_peoples",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "peoples"
|
||||
}
|
||||
@@ -255,9 +255,9 @@ return {
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MesureViewOrganizationQuery",
|
||||
"name": "MeasureViewOrganizationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MesureViewOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query MeasureViewOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -11,18 +11,18 @@
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type EvidenceState = "FULFILLED" | "REQUESTED";
|
||||
export type EvidenceType = "FILE" | "LINK";
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type MesureViewQuery$variables = {
|
||||
mesureId: string;
|
||||
export type MeasureViewQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MesureViewQuery$data = {
|
||||
readonly mesure: {
|
||||
export type MeasureViewQuery$data = {
|
||||
readonly measure: {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
readonly state?: MesureState;
|
||||
readonly state?: MeasureState;
|
||||
readonly tasks?: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
@@ -58,9 +58,9 @@ export type MesureViewQuery$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewQuery = {
|
||||
response: MesureViewQuery$data;
|
||||
variables: MesureViewQuery$variables;
|
||||
export type MeasureViewQuery = {
|
||||
response: MeasureViewQuery$data;
|
||||
variables: MeasureViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -68,14 +68,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "mesureId"
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "mesureId"
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -289,10 +289,10 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewQuery",
|
||||
"name": "MeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -312,7 +312,7 @@ return {
|
||||
"args": null,
|
||||
"concreteType": "TaskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureView_tasks_connection",
|
||||
"name": "__MeasureView_tasks_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -342,7 +342,7 @@ return {
|
||||
"args": null,
|
||||
"concreteType": "EvidenceConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureView_evidences_connection",
|
||||
"name": "__MeasureView_evidences_connection",
|
||||
"plural": false,
|
||||
"selections": (v13/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -361,7 +361,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -375,10 +375,10 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewQuery",
|
||||
"name": "MeasureViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -439,7 +439,7 @@ return {
|
||||
"args": (v15/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureView_evidences",
|
||||
"key": "MeasureView_evidences",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "evidences"
|
||||
},
|
||||
@@ -461,12 +461,12 @@ return {
|
||||
"args": (v14/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureView_tasks",
|
||||
"key": "MeasureView_tasks",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "tasks"
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -490,15 +490,15 @@ return {
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"mesure",
|
||||
"measure",
|
||||
"tasks"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MesureViewQuery",
|
||||
"name": "MeasureViewQuery",
|
||||
"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 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 MeasureViewQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,11 +9,11 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureViewRisksQuery$variables = {
|
||||
mesureId: string;
|
||||
export type MeasureViewRisksQuery$variables = {
|
||||
measureId: string;
|
||||
};
|
||||
export type MesureViewRisksQuery$data = {
|
||||
readonly mesure: {
|
||||
export type MeasureViewRisksQuery$data = {
|
||||
readonly measure: {
|
||||
readonly id: string;
|
||||
readonly risks?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
@@ -34,9 +34,9 @@ export type MesureViewRisksQuery$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewRisksQuery = {
|
||||
response: MesureViewRisksQuery$data;
|
||||
variables: MesureViewRisksQuery$variables;
|
||||
export type MeasureViewRisksQuery = {
|
||||
response: MeasureViewRisksQuery$data;
|
||||
variables: MeasureViewRisksQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -44,14 +44,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "mesureId"
|
||||
"name": "measureId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "mesureId"
|
||||
"variableName": "measureId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -208,10 +208,10 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewRisksQuery",
|
||||
"name": "MeasureViewRisksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -227,13 +227,13 @@ return {
|
||||
"args": null,
|
||||
"concreteType": "RiskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__MesureView_risks_connection",
|
||||
"name": "__MeasureView_risks_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -247,10 +247,10 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewRisksQuery",
|
||||
"name": "MeasureViewRisksQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesure",
|
||||
"alias": "measure",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -277,12 +277,12 @@ return {
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "MesureView_risks",
|
||||
"key": "MeasureView_risks",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "risks"
|
||||
}
|
||||
],
|
||||
"type": "Mesure",
|
||||
"type": "Measure",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -300,15 +300,15 @@ return {
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"mesure",
|
||||
"measure",
|
||||
"risks"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "MesureViewRisksQuery",
|
||||
"name": "MeasureViewRisksQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MesureViewRisksQuery(\n $mesureId: ID!\n) {\n mesure: node(id: $mesureId) {\n __typename\n id\n ... on Mesure {\n risks(first: 100) {\n edges {\n node {\n id\n name\n description\n inherentLikelihood\n inherentImpact\n inherentSeverity\n residualLikelihood\n residualImpact\n residualSeverity\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query MeasureViewRisksQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\n risks(first: 100) {\n edges {\n node {\n id\n name\n description\n inherentLikelihood\n inherentImpact\n inherentSeverity\n residualLikelihood\n residualImpact\n residualSeverity\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -12,10 +12,10 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type UnassignTaskInput = {
|
||||
taskId: string;
|
||||
};
|
||||
export type MesureViewUnassignTaskMutation$variables = {
|
||||
export type MeasureViewUnassignTaskMutation$variables = {
|
||||
input: UnassignTaskInput;
|
||||
};
|
||||
export type MesureViewUnassignTaskMutation$data = {
|
||||
export type MeasureViewUnassignTaskMutation$data = {
|
||||
readonly unassignTask: {
|
||||
readonly task: {
|
||||
readonly assignedTo: {
|
||||
@@ -27,9 +27,9 @@ export type MesureViewUnassignTaskMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewUnassignTaskMutation = {
|
||||
response: MesureViewUnassignTaskMutation$data;
|
||||
variables: MesureViewUnassignTaskMutation$variables;
|
||||
export type MeasureViewUnassignTaskMutation = {
|
||||
response: MeasureViewUnassignTaskMutation$data;
|
||||
variables: MeasureViewUnassignTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -109,7 +109,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewUnassignTaskMutation",
|
||||
"name": "MeasureViewUnassignTaskMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -118,16 +118,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewUnassignTaskMutation",
|
||||
"name": "MeasureViewUnassignTaskMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "3f91f027e7a8a935f306386469bbac21",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewUnassignTaskMutation",
|
||||
"name": "MeasureViewUnassignTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewUnassignTaskMutation(\n $input: UnassignTaskInput!\n) {\n unassignTask(input: $input) {\n task {\n id\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewUnassignTaskMutation(\n $input: UnassignTaskInput!\n) {\n unassignTask(input: $input) {\n task {\n id\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -9,28 +9,28 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMesureInput = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMeasureInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
id: string;
|
||||
name?: string | null | undefined;
|
||||
state?: MesureState | null | undefined;
|
||||
state?: MeasureState | null | undefined;
|
||||
};
|
||||
export type MesureViewUpdateMesureStateMutation$variables = {
|
||||
input: UpdateMesureInput;
|
||||
export type MeasureViewUpdateMeasureStateMutation$variables = {
|
||||
input: UpdateMeasureInput;
|
||||
};
|
||||
export type MesureViewUpdateMesureStateMutation$data = {
|
||||
readonly updateMesure: {
|
||||
readonly mesure: {
|
||||
export type MeasureViewUpdateMeasureStateMutation$data = {
|
||||
readonly updateMeasure: {
|
||||
readonly measure: {
|
||||
readonly id: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewUpdateMesureStateMutation = {
|
||||
response: MesureViewUpdateMesureStateMutation$data;
|
||||
variables: MesureViewUpdateMesureStateMutation$variables;
|
||||
export type MeasureViewUpdateMeasureStateMutation = {
|
||||
response: MeasureViewUpdateMeasureStateMutation$data;
|
||||
variables: MeasureViewUpdateMeasureStateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -51,17 +51,17 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateMesurePayload",
|
||||
"concreteType": "UpdateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateMesure",
|
||||
"name": "updateMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesure",
|
||||
"name": "measure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -90,7 +90,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewUpdateMesureStateMutation",
|
||||
"name": "MeasureViewUpdateMeasureStateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -99,16 +99,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewUpdateMesureStateMutation",
|
||||
"name": "MeasureViewUpdateMeasureStateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "59db8143f555230677a401f5bed6a6c3",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewUpdateMesureStateMutation",
|
||||
"name": "MeasureViewUpdateMeasureStateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewUpdateMesureStateMutation(\n $input: UpdateMesureInput!\n) {\n updateMesure(input: $input) {\n mesure {\n id\n state\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewUpdateMeasureStateMutation(\n $input: UpdateMeasureInput!\n) {\n updateMeasure(input: $input) {\n measure {\n id\n state\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -17,10 +17,10 @@ export type UpdateTaskInput = {
|
||||
taskId: string;
|
||||
timeEstimate?: any | null | undefined;
|
||||
};
|
||||
export type MesureViewUpdateTaskStateMutation$variables = {
|
||||
export type MeasureViewUpdateTaskStateMutation$variables = {
|
||||
input: UpdateTaskInput;
|
||||
};
|
||||
export type MesureViewUpdateTaskStateMutation$data = {
|
||||
export type MeasureViewUpdateTaskStateMutation$data = {
|
||||
readonly updateTask: {
|
||||
readonly task: {
|
||||
readonly id: string;
|
||||
@@ -29,9 +29,9 @@ export type MesureViewUpdateTaskStateMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewUpdateTaskStateMutation = {
|
||||
response: MesureViewUpdateTaskStateMutation$data;
|
||||
variables: MesureViewUpdateTaskStateMutation$variables;
|
||||
export type MeasureViewUpdateTaskStateMutation = {
|
||||
response: MeasureViewUpdateTaskStateMutation$data;
|
||||
variables: MeasureViewUpdateTaskStateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -98,7 +98,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "MesureViewUpdateTaskStateMutation",
|
||||
"name": "MeasureViewUpdateTaskStateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -107,16 +107,16 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "MesureViewUpdateTaskStateMutation",
|
||||
"name": "MeasureViewUpdateTaskStateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "3af3e26a5c5be4c129b6d1706d3d1b59",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MesureViewUpdateTaskStateMutation",
|
||||
"name": "MeasureViewUpdateTaskStateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation MesureViewUpdateTaskStateMutation(\n $input: UpdateTaskInput!\n) {\n updateTask(input: $input) {\n task {\n id\n state\n timeEstimate\n }\n }\n}\n"
|
||||
"text": "mutation MeasureViewUpdateTaskStateMutation(\n $input: UpdateTaskInput!\n) {\n updateTask(input: $input) {\n task {\n id\n state\n timeEstimate\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -19,11 +19,11 @@ export type UploadEvidenceInput = {
|
||||
type: EvidenceType;
|
||||
url?: string | null | undefined;
|
||||
};
|
||||
export type MesureViewUploadEvidenceMutation$variables = {
|
||||
export type MeasureViewUploadEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: UploadEvidenceInput;
|
||||
};
|
||||
export type MesureViewUploadEvidenceMutation$data = {
|
||||
export type MeasureViewUploadEvidenceMutation$data = {
|
||||
readonly uploadEvidence: {
|
||||
readonly evidenceEdge: {
|
||||
readonly node: {
|
||||
@@ -40,9 +40,9 @@ export type MesureViewUploadEvidenceMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type MesureViewUploadEvidenceMutation = {
|
||||
response: MesureViewUploadEvidenceMutation$data;
|
||||
variables: MesureViewUploadEvidenceMutation$variables;
|
||||
export type MeasureViewUploadEvidenceMutation = {
|
||||
response: MeasureViewUploadEvidenceMutation$data;
|
||||
variables: MeasureViewUploadEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function () {
|
||||
@@ -153,7 +153,7 @@ const node: ConcreteRequest = (function () {
|
||||
argumentDefinitions: [v0 /*: any*/, v1 /*: any*/],
|
||||
kind: "Fragment",
|
||||
metadata: null,
|
||||
name: "MesureViewUploadEvidenceMutation",
|
||||
name: "MeasureViewUploadEvidenceMutation",
|
||||
selections: [
|
||||
{
|
||||
alias: null,
|
||||
@@ -173,7 +173,7 @@ const node: ConcreteRequest = (function () {
|
||||
operation: {
|
||||
argumentDefinitions: [v1 /*: any*/, v0 /*: any*/],
|
||||
kind: "Operation",
|
||||
name: "MesureViewUploadEvidenceMutation",
|
||||
name: "MeasureViewUploadEvidenceMutation",
|
||||
selections: [
|
||||
{
|
||||
alias: null,
|
||||
@@ -209,9 +209,9 @@ const node: ConcreteRequest = (function () {
|
||||
cacheID: "30a6915055d3f6b63d96836b26f05a45",
|
||||
id: null,
|
||||
metadata: {},
|
||||
name: "MesureViewUploadEvidenceMutation",
|
||||
name: "MeasureViewUploadEvidenceMutation",
|
||||
operationKind: "mutation",
|
||||
text: "mutation MesureViewUploadEvidenceMutation(\n $input: UploadEvidenceInput!\n) {\n uploadEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n }\n }\n }\n}\n",
|
||||
text: "mutation MeasureViewUploadEvidenceMutation(\n $input: UploadEvidenceInput!\n) {\n uploadEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n }\n }\n }\n}\n",
|
||||
},
|
||||
};
|
||||
})();
|
||||
@@ -0,0 +1,177 @@
|
||||
/**
|
||||
* @generated SignedSource<<5e6355327f3097f4e2081c313e93143a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateMeasureInput = {
|
||||
category: string;
|
||||
description: string;
|
||||
name: string;
|
||||
organizationId: string;
|
||||
};
|
||||
export type NewMeasureViewCreateMeasureMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateMeasureInput;
|
||||
};
|
||||
export type NewMeasureViewCreateMeasureMutation$data = {
|
||||
readonly createMeasure: {
|
||||
readonly measureEdge: {
|
||||
readonly node: {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type NewMeasureViewCreateMeasureMutation = {
|
||||
response: NewMeasureViewCreateMeasureMutation$data;
|
||||
variables: NewMeasureViewCreateMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "measureEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "NewMeasureViewCreateMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "NewMeasureViewCreateMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "measureEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "653394b4ee4a38ca9a1ab16847969464",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "NewMeasureViewCreateMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation NewMeasureViewCreateMeasureMutation(\n $input: CreateMeasureInput!\n) {\n createMeasure(input: $input) {\n measureEdge {\n node {\n id\n name\n description\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e75d982c8f9d92fcea1aef2de7b2ad47";
|
||||
|
||||
export default node;
|
||||
@@ -9,19 +9,19 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateMesureInput = {
|
||||
export type CreateMeasureInput = {
|
||||
category: string;
|
||||
description: string;
|
||||
name: string;
|
||||
organizationId: string;
|
||||
};
|
||||
export type NewMesureViewCreateMesureMutation$variables = {
|
||||
export type NewMeasureViewCreateMeasureMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateMesureInput;
|
||||
input: CreateMeasureInput;
|
||||
};
|
||||
export type NewMesureViewCreateMesureMutation$data = {
|
||||
readonly createMesure: {
|
||||
readonly mesureEdge: {
|
||||
export type NewMeasureViewCreateMeasureMutation$data = {
|
||||
readonly createMeasure: {
|
||||
readonly measureEdge: {
|
||||
readonly node: {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
@@ -30,9 +30,9 @@ export type NewMesureViewCreateMesureMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type NewMesureViewCreateMesureMutation = {
|
||||
response: NewMesureViewCreateMesureMutation$data;
|
||||
variables: NewMesureViewCreateMesureMutation$variables;
|
||||
export type NewMeasureViewCreateMeasureMutation = {
|
||||
response: NewMeasureViewCreateMeasureMutation$data;
|
||||
variables: NewMeasureViewCreateMeasureMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -56,15 +56,15 @@ v2 = [
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesureEdge",
|
||||
"name": "measureEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -104,14 +104,14 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "NewMesureViewCreateMesureMutation",
|
||||
"name": "NewMeasureViewCreateMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateMesurePayload",
|
||||
"concreteType": "CreateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createMesure",
|
||||
"name": "createMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
@@ -129,14 +129,14 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "NewMesureViewCreateMesureMutation",
|
||||
"name": "NewMeasureViewCreateMeasureMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateMesurePayload",
|
||||
"concreteType": "CreateMeasurePayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createMesure",
|
||||
"name": "createMeasure",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
@@ -147,7 +147,7 @@ return {
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesureEdge",
|
||||
"name": "measureEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
@@ -165,9 +165,9 @@ return {
|
||||
"cacheID": "de8b930c9628c62ae4272bd427076ebd",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "NewMesureViewCreateMesureMutation",
|
||||
"name": "NewMeasureViewCreateMeasureMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation NewMesureViewCreateMesureMutation(\n $input: CreateMesureInput!\n) {\n createMesure(input: $input) {\n mesureEdge {\n node {\n id\n name\n description\n }\n }\n }\n}\n"
|
||||
"text": "mutation NewMeasureViewCreateMeasureMutation(\n $input: CreateMeasureInput!\n) {\n createMeasure(input: $input) {\n measureEdge {\n node {\n id\n name\n description\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -114,7 +114,7 @@ function NewPeopleViewContent() {
|
||||
),
|
||||
ConnectionHandler.getConnectionID(
|
||||
organizationId!,
|
||||
"MesureView_peoples",
|
||||
"MeasureView_peoples",
|
||||
{
|
||||
orderBy: {
|
||||
direction: "ASC",
|
||||
|
||||
@@ -16,7 +16,7 @@ export function PolicyListViewSkeleton() {
|
||||
<div className="bg-subtle-bg animate-pulse h-9 w-1/6 rounded-lg" />
|
||||
}
|
||||
>
|
||||
{/* Search and filter mesures skeleton */}
|
||||
{/* Search and filter measures skeleton */}
|
||||
<div className="flex flex-col md:flex-row gap-4 mb-6">
|
||||
<div className="flex-1 h-10 bg-subtle-bg animate-pulse rounded" />
|
||||
<div className="flex gap-2">
|
||||
|
||||
@@ -106,7 +106,7 @@ const listRiskViewFragment = graphql`
|
||||
id
|
||||
fullName
|
||||
}
|
||||
mesures(first: 1) {
|
||||
measures(first: 1) {
|
||||
edges {
|
||||
node {
|
||||
category
|
||||
@@ -240,7 +240,7 @@ type RiskNode = {
|
||||
readonly id: string;
|
||||
readonly fullName: string;
|
||||
} | null;
|
||||
readonly mesures: {
|
||||
readonly measures: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
|
||||
@@ -54,11 +54,11 @@ import {
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import {
|
||||
ShowRiskViewOrganizationMesuresQuery,
|
||||
ShowRiskViewOrganizationMesuresQuery$data,
|
||||
} from "./__generated__/ShowRiskViewOrganizationMesuresQuery.graphql";
|
||||
import { ShowRiskViewCreateRiskMesureMappingMutation } from "./__generated__/ShowRiskViewCreateRiskMesureMappingMutation.graphql";
|
||||
import { ShowRiskViewDeleteRiskMesureMappingMutation } from "./__generated__/ShowRiskViewDeleteRiskMesureMappingMutation.graphql";
|
||||
ShowRiskViewOrganizationMeasuresQuery,
|
||||
ShowRiskViewOrganizationMeasuresQuery$data,
|
||||
} from "./__generated__/ShowRiskViewOrganizationMeasuresQuery.graphql";
|
||||
import { ShowRiskViewCreateRiskMeasureMappingMutation } from "./__generated__/ShowRiskViewCreateRiskMeasureMappingMutation.graphql";
|
||||
import { ShowRiskViewDeleteRiskMeasureMappingMutation } from "./__generated__/ShowRiskViewDeleteRiskMeasureMappingMutation.graphql";
|
||||
import {
|
||||
ShowRiskViewOrganizationPoliciesQuery,
|
||||
ShowRiskViewOrganizationPoliciesQuery$data,
|
||||
@@ -85,7 +85,7 @@ const showRiskViewQuery = graphql`
|
||||
note
|
||||
createdAt
|
||||
updatedAt
|
||||
mesures(first: 100) @connection(key: "Risk__mesures") {
|
||||
measures(first: 100) @connection(key: "Risk__measures") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -122,13 +122,13 @@ const showRiskViewQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
// Add query to fetch all mesures for the organization
|
||||
const organizationMesuresQuery = graphql`
|
||||
query ShowRiskViewOrganizationMesuresQuery($organizationId: ID!) {
|
||||
// Add query to fetch all measures for the organization
|
||||
const organizationMeasuresQuery = graphql`
|
||||
query ShowRiskViewOrganizationMeasuresQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
id
|
||||
... on Organization {
|
||||
mesures(first: 100) @connection(key: "Organization__mesures") {
|
||||
measures(first: 100) @connection(key: "Organization__measures") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -163,23 +163,23 @@ const organizationPoliciesQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
// Add mutation to create risk-mesure mapping
|
||||
const createRiskMesureMappingMutation = graphql`
|
||||
mutation ShowRiskViewCreateRiskMesureMappingMutation(
|
||||
$input: CreateRiskMesureMappingInput!
|
||||
// Add mutation to create risk-measure mapping
|
||||
const createRiskMeasureMappingMutation = graphql`
|
||||
mutation ShowRiskViewCreateRiskMeasureMappingMutation(
|
||||
$input: CreateRiskMeasureMappingInput!
|
||||
) {
|
||||
createRiskMesureMapping(input: $input) {
|
||||
createRiskMeasureMapping(input: $input) {
|
||||
success
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// Add mutation to delete risk-mesure mapping
|
||||
const deleteRiskMesureMappingMutation = graphql`
|
||||
mutation ShowRiskViewDeleteRiskMesureMappingMutation(
|
||||
$input: DeleteRiskMesureMappingInput!
|
||||
// Add mutation to delete risk-measure mapping
|
||||
const deleteRiskMeasureMappingMutation = graphql`
|
||||
mutation ShowRiskViewDeleteRiskMeasureMappingMutation(
|
||||
$input: DeleteRiskMeasureMappingInput!
|
||||
) {
|
||||
deleteRiskMesureMapping(input: $input) {
|
||||
deleteRiskMeasureMapping(input: $input) {
|
||||
success
|
||||
}
|
||||
}
|
||||
@@ -329,8 +329,8 @@ function ShowRiskViewContent({
|
||||
risk.inherentImpact!
|
||||
);
|
||||
|
||||
// Fix typing for mesures
|
||||
const mesures = risk.mesures?.edges?.map((edge) => edge.node) || [];
|
||||
// Fix typing for measures
|
||||
const measures = risk.measures?.edges?.map((edge) => edge.node) || [];
|
||||
const residualSeverity = getRiskSeverity(
|
||||
risk.residualLikelihood!,
|
||||
risk.residualImpact!
|
||||
@@ -342,17 +342,17 @@ function ShowRiskViewContent({
|
||||
// Fix typing for controls
|
||||
const controls = risk.controls?.edges?.map((edge) => edge.node) || [];
|
||||
|
||||
// Add state for mesure mapping dialog
|
||||
const [isMesureDialogOpen, setIsMesureDialogOpen] = useState(false);
|
||||
const [organizationMesuresData, setOrganizationMesuresData] =
|
||||
useState<ShowRiskViewOrganizationMesuresQuery$data | null>(null);
|
||||
const [mesureSearchQuery, setMesureSearchQuery] = useState("");
|
||||
// Add state for measure mapping dialog
|
||||
const [isMeasureDialogOpen, setIsMeasureDialogOpen] = useState(false);
|
||||
const [organizationMeasuresData, setOrganizationMeasuresData] =
|
||||
useState<ShowRiskViewOrganizationMeasuresQuery$data | null>(null);
|
||||
const [measureSearchQuery, setMeasureSearchQuery] = useState("");
|
||||
const [categoryFilter, setCategoryFilter] = useState<string | null>(null);
|
||||
const [isLoadingMesures, setIsLoadingMesures] = useState(false);
|
||||
const [linkingMesures, setLinkingMesures] = useState<Record<string, boolean>>(
|
||||
const [isLoadingMeasures, setIsLoadingMeasures] = useState(false);
|
||||
const [linkingMeasures, setLinkingMeasures] = useState<Record<string, boolean>>(
|
||||
{}
|
||||
);
|
||||
const [unlinkingMesures, setUnlinkingMesures] = useState<
|
||||
const [unlinkingMeasures, setUnlinkingMeasures] = useState<
|
||||
Record<string, boolean>
|
||||
>({});
|
||||
|
||||
@@ -370,13 +370,13 @@ function ShowRiskViewContent({
|
||||
>({});
|
||||
|
||||
// Setup mutation hooks
|
||||
const [createRiskMesureMapping] =
|
||||
useMutation<ShowRiskViewCreateRiskMesureMappingMutation>(
|
||||
createRiskMesureMappingMutation
|
||||
const [createRiskMeasureMapping] =
|
||||
useMutation<ShowRiskViewCreateRiskMeasureMappingMutation>(
|
||||
createRiskMeasureMappingMutation
|
||||
);
|
||||
const [deleteRiskMesureMapping] =
|
||||
useMutation<ShowRiskViewDeleteRiskMesureMappingMutation>(
|
||||
deleteRiskMesureMappingMutation
|
||||
const [deleteRiskMeasureMapping] =
|
||||
useMutation<ShowRiskViewDeleteRiskMeasureMappingMutation>(
|
||||
deleteRiskMeasureMappingMutation
|
||||
);
|
||||
|
||||
// Setup policy mutation hooks
|
||||
@@ -391,13 +391,13 @@ function ShowRiskViewContent({
|
||||
|
||||
// Clear filters when dialog closes
|
||||
useEffect(() => {
|
||||
if (!isMesureDialogOpen) {
|
||||
setMesureSearchQuery("");
|
||||
if (!isMeasureDialogOpen) {
|
||||
setMeasureSearchQuery("");
|
||||
setCategoryFilter(null);
|
||||
setLinkingMesures({});
|
||||
setUnlinkingMesures({});
|
||||
setLinkingMeasures({});
|
||||
setUnlinkingMeasures({});
|
||||
}
|
||||
}, [isMesureDialogOpen]);
|
||||
}, [isMeasureDialogOpen]);
|
||||
|
||||
// Clear filters when policy dialog closes
|
||||
useEffect(() => {
|
||||
@@ -408,30 +408,30 @@ function ShowRiskViewContent({
|
||||
}
|
||||
}, [isPolicyDialogOpen]);
|
||||
|
||||
// Load mesures data when needed
|
||||
const loadMesuresData = useCallback(() => {
|
||||
// Load measures data when needed
|
||||
const loadMeasuresData = useCallback(() => {
|
||||
if (!organizationId || !risk.id) return;
|
||||
|
||||
setIsLoadingMesures(true);
|
||||
setIsLoadingMeasures(true);
|
||||
|
||||
// Fetch all mesures for the organization
|
||||
fetchQuery<ShowRiskViewOrganizationMesuresQuery>(
|
||||
// Fetch all measures for the organization
|
||||
fetchQuery<ShowRiskViewOrganizationMeasuresQuery>(
|
||||
environment,
|
||||
organizationMesuresQuery,
|
||||
organizationMeasuresQuery,
|
||||
{
|
||||
organizationId,
|
||||
}
|
||||
).subscribe({
|
||||
next: (data) => {
|
||||
setOrganizationMesuresData(data);
|
||||
setIsLoadingMesures(false);
|
||||
setOrganizationMeasuresData(data);
|
||||
setIsLoadingMeasures(false);
|
||||
},
|
||||
error: (error: Error) => {
|
||||
console.error("Error fetching organization mesures:", error);
|
||||
setIsLoadingMesures(false);
|
||||
console.error("Error fetching organization measures:", error);
|
||||
setIsLoadingMeasures(false);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to load mesures.",
|
||||
description: "Failed to load measures.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
@@ -469,49 +469,49 @@ function ShowRiskViewContent({
|
||||
}, [risk.id, environment, organizationId, toast]);
|
||||
|
||||
// Helper functions
|
||||
const getMesures = useCallback(() => {
|
||||
if (!organizationMesuresData?.organization?.mesures?.edges) return [];
|
||||
return organizationMesuresData.organization.mesures.edges.map(
|
||||
const getMeasures = useCallback(() => {
|
||||
if (!organizationMeasuresData?.organization?.measures?.edges) return [];
|
||||
return organizationMeasuresData.organization.measures.edges.map(
|
||||
(edge) => edge.node
|
||||
);
|
||||
}, [organizationMesuresData]);
|
||||
}, [organizationMeasuresData]);
|
||||
|
||||
const getMesureCategories = useCallback(() => {
|
||||
const mesures = getMesures();
|
||||
const getMeasureCategories = useCallback(() => {
|
||||
const measures = getMeasures();
|
||||
const categories = new Set<string>();
|
||||
|
||||
mesures.forEach((mesure) => {
|
||||
if (mesure.category) {
|
||||
categories.add(mesure.category);
|
||||
measures.forEach((measure) => {
|
||||
if (measure.category) {
|
||||
categories.add(measure.category);
|
||||
}
|
||||
});
|
||||
|
||||
return Array.from(categories).sort();
|
||||
}, [getMesures]);
|
||||
}, [getMeasures]);
|
||||
|
||||
const filteredMesures = useCallback(() => {
|
||||
const mesures = getMesures();
|
||||
if (!mesureSearchQuery && !categoryFilter) return mesures;
|
||||
const filteredMeasures = useCallback(() => {
|
||||
const measures = getMeasures();
|
||||
if (!measureSearchQuery && !categoryFilter) return measures;
|
||||
|
||||
return mesures.filter((mesure) => {
|
||||
return measures.filter((measure) => {
|
||||
// Filter by search query
|
||||
const matchesSearch =
|
||||
!mesureSearchQuery ||
|
||||
mesure.name.toLowerCase().includes(mesureSearchQuery.toLowerCase()) ||
|
||||
(mesure.description &&
|
||||
mesure.description
|
||||
!measureSearchQuery ||
|
||||
measure.name.toLowerCase().includes(measureSearchQuery.toLowerCase()) ||
|
||||
(measure.description &&
|
||||
measure.description
|
||||
.toLowerCase()
|
||||
.includes(mesureSearchQuery.toLowerCase()));
|
||||
.includes(measureSearchQuery.toLowerCase()));
|
||||
|
||||
// Filter by category
|
||||
const matchesCategory =
|
||||
!categoryFilter ||
|
||||
categoryFilter === "all" ||
|
||||
mesure.category === categoryFilter;
|
||||
measure.category === categoryFilter;
|
||||
|
||||
return matchesSearch && matchesCategory;
|
||||
});
|
||||
}, [getMesures, mesureSearchQuery, categoryFilter]);
|
||||
}, [getMeasures, measureSearchQuery, categoryFilter]);
|
||||
|
||||
// Helper functions for policies
|
||||
const getPolicies = useCallback(() => {
|
||||
@@ -533,38 +533,38 @@ function ShowRiskViewContent({
|
||||
});
|
||||
}, [getPolicies, policySearchQuery]);
|
||||
|
||||
// Handle linking a mesure to this risk
|
||||
const handleLinkMesure = useCallback(
|
||||
// Handle linking a measure to this risk
|
||||
const handleLinkMeasure = useCallback(
|
||||
(
|
||||
mesure: NonNullable<
|
||||
measure: NonNullable<
|
||||
NonNullable<
|
||||
ShowRiskViewOrganizationMesuresQuery$data["organization"]
|
||||
>["mesures"]
|
||||
ShowRiskViewOrganizationMeasuresQuery$data["organization"]
|
||||
>["measures"]
|
||||
>["edges"][0]["node"]
|
||||
) => {
|
||||
if (!risk.id) return;
|
||||
|
||||
// Track this specific mesure as linking
|
||||
setLinkingMesures((prev) => ({ ...prev, [mesure.id]: true }));
|
||||
// Track this specific measure as linking
|
||||
setLinkingMeasures((prev) => ({ ...prev, [measure.id]: true }));
|
||||
|
||||
createRiskMesureMapping({
|
||||
createRiskMeasureMapping({
|
||||
variables: {
|
||||
input: {
|
||||
riskId: risk.id,
|
||||
mesureId: mesure.id,
|
||||
measureId: measure.id,
|
||||
},
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
setLinkingMesures((prev) => ({
|
||||
setLinkingMeasures((prev) => ({
|
||||
...prev,
|
||||
[mesure.id]: false,
|
||||
[measure.id]: false,
|
||||
}));
|
||||
|
||||
if (errors && errors.length > 0) {
|
||||
console.error("Error linking mesure:", errors);
|
||||
console.error("Error linking measure:", errors);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to link mesure. Please try again.",
|
||||
description: "Failed to link measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -585,58 +585,58 @@ function ShowRiskViewContent({
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: `Linked mesure "${mesure.name}" to this risk.`,
|
||||
description: `Linked measure "${measure.name}" to this risk.`,
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
setLinkingMesures((prev) => ({
|
||||
setLinkingMeasures((prev) => ({
|
||||
...prev,
|
||||
[mesure.id]: false,
|
||||
[measure.id]: false,
|
||||
}));
|
||||
console.error("Error linking mesure:", error);
|
||||
console.error("Error linking measure:", error);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to link mesure. Please try again.",
|
||||
description: "Failed to link measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
[risk.id, createRiskMesureMapping, toast, environment, loadQuery]
|
||||
[risk.id, createRiskMeasureMapping, toast, environment, loadQuery]
|
||||
);
|
||||
|
||||
// Handle unlinking a mesure from this risk
|
||||
const handleUnlinkMesure = useCallback(
|
||||
// Handle unlinking a measure from this risk
|
||||
const handleUnlinkMeasure = useCallback(
|
||||
(
|
||||
mesure: NonNullable<
|
||||
measure: NonNullable<
|
||||
NonNullable<
|
||||
ShowRiskViewOrganizationMesuresQuery$data["organization"]
|
||||
>["mesures"]
|
||||
ShowRiskViewOrganizationMeasuresQuery$data["organization"]
|
||||
>["measures"]
|
||||
>["edges"][0]["node"]
|
||||
) => {
|
||||
if (!risk.id) return;
|
||||
|
||||
// Track this specific mesure as unlinking
|
||||
setUnlinkingMesures((prev) => ({ ...prev, [mesure.id]: true }));
|
||||
// Track this specific measure as unlinking
|
||||
setUnlinkingMeasures((prev) => ({ ...prev, [measure.id]: true }));
|
||||
|
||||
deleteRiskMesureMapping({
|
||||
deleteRiskMeasureMapping({
|
||||
variables: {
|
||||
input: {
|
||||
riskId: risk.id,
|
||||
mesureId: mesure.id,
|
||||
measureId: measure.id,
|
||||
},
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
setUnlinkingMesures((prev) => ({
|
||||
setUnlinkingMeasures((prev) => ({
|
||||
...prev,
|
||||
[mesure.id]: false,
|
||||
[measure.id]: false,
|
||||
}));
|
||||
|
||||
if (errors && errors.length > 0) {
|
||||
console.error("Error unlinking mesure:", errors);
|
||||
console.error("Error unlinking measure:", errors);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to unlink mesure. Please try again.",
|
||||
description: "Failed to unlink measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -657,24 +657,24 @@ function ShowRiskViewContent({
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: `Unlinked mesure "${mesure.name}" from this risk.`,
|
||||
description: `Unlinked measure "${measure.name}" from this risk.`,
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
setUnlinkingMesures((prev) => ({
|
||||
setUnlinkingMeasures((prev) => ({
|
||||
...prev,
|
||||
[mesure.id]: false,
|
||||
[measure.id]: false,
|
||||
}));
|
||||
console.error("Error unlinking mesure:", error);
|
||||
console.error("Error unlinking measure:", error);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: "Failed to unlink mesure. Please try again.",
|
||||
description: "Failed to unlink measure. Please try again.",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
[risk.id, deleteRiskMesureMapping, toast, environment, loadQuery]
|
||||
[risk.id, deleteRiskMeasureMapping, toast, environment, loadQuery]
|
||||
);
|
||||
|
||||
// Handle linking a policy to this risk
|
||||
@@ -994,10 +994,10 @@ function ShowRiskViewContent({
|
||||
{risk.residualLikelihood! * risk.residualImpact!})
|
||||
</span>
|
||||
{risk.treatment === "MITIGATED" &&
|
||||
risk.mesures?.edges &&
|
||||
risk.mesures.edges.length > 0 &&
|
||||
` with ${risk.mesures.edges.length} ${
|
||||
risk.mesures.edges.length === 1
|
||||
risk.measures?.edges &&
|
||||
risk.measures.edges.length > 0 &&
|
||||
` with ${risk.measures.edges.length} ${
|
||||
risk.measures.edges.length === 1
|
||||
? "measure"
|
||||
: "measures"
|
||||
}`}
|
||||
@@ -1022,53 +1022,53 @@ function ShowRiskViewContent({
|
||||
</Card>
|
||||
)}
|
||||
|
||||
<Tabs defaultValue="mesures" className="w-full">
|
||||
<Tabs defaultValue="measures" className="w-full">
|
||||
<TabsList>
|
||||
<TabsTrigger value="mesures">Mesures</TabsTrigger>
|
||||
<TabsTrigger value="measures">Measures</TabsTrigger>
|
||||
<TabsTrigger value="policies">Policies</TabsTrigger>
|
||||
<TabsTrigger value="controls">Controls</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
<TabsContent value="mesures" className="space-y-4">
|
||||
<TabsContent value="measures" className="space-y-4">
|
||||
<div className="flex justify-between items-center mb-4">
|
||||
<h2 className="text-xl font-semibold">Risk Mesures</h2>
|
||||
<h2 className="text-xl font-semibold">Risk Measures</h2>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setIsMesureDialogOpen(true);
|
||||
loadMesuresData();
|
||||
setIsMeasureDialogOpen(true);
|
||||
loadMeasuresData();
|
||||
}}
|
||||
>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Link Mesure
|
||||
Link Measure
|
||||
</Button>
|
||||
</div>
|
||||
{risk.mesures?.edges && risk.mesures.edges.length > 0 ? (
|
||||
{risk.measures?.edges && risk.measures.edges.length > 0 ? (
|
||||
<div className="rounded-md border">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className="w-full">Mesure</TableHead>
|
||||
<TableHead className="w-full">Measure</TableHead>
|
||||
<TableHead className="w-20">Actions</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{risk.mesures?.edges.map(({ node: mesure }) => (
|
||||
<TableRow key={mesure.id}>
|
||||
{risk.measures?.edges.map(({ node: measure }) => (
|
||||
<TableRow key={measure.id}>
|
||||
<TableCell>
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/mesures/${mesure.id}`}
|
||||
to={`/organizations/${organizationId}/measures/${measure.id}`}
|
||||
className="font-medium text-blue-600 hover:underline"
|
||||
>
|
||||
{mesure.name}
|
||||
{measure.name}
|
||||
</Link>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => handleUnlinkMesure(mesure)}
|
||||
disabled={unlinkingMesures[mesure.id] || false}
|
||||
title="Unlink mesure"
|
||||
onClick={() => handleUnlinkMeasure(measure)}
|
||||
disabled={unlinkingMeasures[measure.id] || false}
|
||||
title="Unlink measure"
|
||||
>
|
||||
<Trash2 className="h-4 w-4 text-danger" />
|
||||
</Button>
|
||||
@@ -1080,7 +1080,7 @@ function ShowRiskViewContent({
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-10 text-secondary">
|
||||
<p>No mesures associated with this risk.</p>
|
||||
<p>No measures associated with this risk.</p>
|
||||
</div>
|
||||
)}
|
||||
</TabsContent>
|
||||
@@ -1189,15 +1189,15 @@ function ShowRiskViewContent({
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
|
||||
{/* Dialog for linking mesures */}
|
||||
<Dialog open={isMesureDialogOpen} onOpenChange={setIsMesureDialogOpen}>
|
||||
{/* Dialog for linking measures */}
|
||||
<Dialog open={isMeasureDialogOpen} onOpenChange={setIsMeasureDialogOpen}>
|
||||
<DialogContent className="max-w-3xl">
|
||||
<DialogHeader>
|
||||
<div className="flex justify-between items-center">
|
||||
<div>
|
||||
<DialogTitle>Manage Risk Mesures</DialogTitle>
|
||||
<DialogTitle>Manage Risk Measures</DialogTitle>
|
||||
<DialogDescription>
|
||||
Link or unlink mesures to manage this risk.
|
||||
Link or unlink measures to manage this risk.
|
||||
</DialogDescription>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1209,10 +1209,10 @@ function ShowRiskViewContent({
|
||||
<div className="relative">
|
||||
<Search className="absolute left-2 top-2.5 h-4 w-4 text-tertiary" />
|
||||
<Input
|
||||
placeholder="Search mesures..."
|
||||
placeholder="Search measures..."
|
||||
className="pl-8"
|
||||
value={mesureSearchQuery}
|
||||
onChange={(e) => setMesureSearchQuery(e.target.value)}
|
||||
value={measureSearchQuery}
|
||||
onChange={(e) => setMeasureSearchQuery(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1227,7 +1227,7 @@ function ShowRiskViewContent({
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="all">All Categories</SelectItem>
|
||||
{getMesureCategories().map((category) => (
|
||||
{getMeasureCategories().map((category) => (
|
||||
<SelectItem key={category} value={category}>
|
||||
{category}
|
||||
</SelectItem>
|
||||
@@ -1237,35 +1237,35 @@ function ShowRiskViewContent({
|
||||
</div>
|
||||
|
||||
<div className="border rounded-md max-h-96 overflow-y-auto">
|
||||
{isLoadingMesures ? (
|
||||
<div className="p-4 text-center">Loading mesures...</div>
|
||||
) : filteredMesures().length === 0 ? (
|
||||
<div className="p-4 text-center">No mesures found.</div>
|
||||
{isLoadingMeasures ? (
|
||||
<div className="p-4 text-center">Loading measures...</div>
|
||||
) : filteredMeasures().length === 0 ? (
|
||||
<div className="p-4 text-center">No measures found.</div>
|
||||
) : (
|
||||
<div className="divide-y">
|
||||
{filteredMesures().map((mesure) => {
|
||||
{filteredMeasures().map((measure) => {
|
||||
// For each render, recalculate linked status directly against the current risk data
|
||||
const isLinked = risk.mesures?.edges?.some(
|
||||
(edge) => edge.node.id === mesure.id
|
||||
const isLinked = risk.measures?.edges?.some(
|
||||
(edge) => edge.node.id === measure.id
|
||||
);
|
||||
const isLinking = linkingMesures[mesure.id] || false;
|
||||
const isUnlinking = unlinkingMesures[mesure.id] || false;
|
||||
const isLinking = linkingMeasures[measure.id] || false;
|
||||
const isUnlinking = unlinkingMeasures[measure.id] || false;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={mesure.id}
|
||||
key={measure.id}
|
||||
className="relative p-4 hover:bg-blue-50 transition-colors duration-150"
|
||||
>
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex items-center gap-2">
|
||||
<h3 className="font-medium">{mesure.name}</h3>
|
||||
{mesure.category && (
|
||||
<h3 className="font-medium">{measure.name}</h3>
|
||||
{measure.category && (
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="text-xs font-normal"
|
||||
>
|
||||
<Tag className="h-3 w-3 mr-1" />
|
||||
{mesure.category}
|
||||
{measure.category}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
@@ -1274,7 +1274,7 @@ function ShowRiskViewContent({
|
||||
size="sm"
|
||||
variant="outline"
|
||||
disabled={isUnlinking}
|
||||
onClick={() => handleUnlinkMesure(mesure)}
|
||||
onClick={() => handleUnlinkMeasure(measure)}
|
||||
className="text-red-600 border-red-200 hover:bg-red-50"
|
||||
>
|
||||
{isUnlinking ? "Unlinking..." : "Unlink"}
|
||||
@@ -1283,7 +1283,7 @@ function ShowRiskViewContent({
|
||||
<Button
|
||||
size="sm"
|
||||
disabled={isLinking}
|
||||
onClick={() => handleLinkMesure(mesure)}
|
||||
onClick={() => handleLinkMeasure(measure)}
|
||||
>
|
||||
{isLinking ? "Linking..." : "Link"}
|
||||
</Button>
|
||||
@@ -1300,7 +1300,7 @@ function ShowRiskViewContent({
|
||||
<DialogFooter>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setIsMesureDialogOpen(false)}
|
||||
onClick={() => setIsMeasureDialogOpen(false)}
|
||||
>
|
||||
Close
|
||||
</Button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<f0234c8da839e9d7babc696edb1171aa>>
|
||||
* @generated SignedSource<<42dea43217da18c2c1c44893753af2a0>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -278,15 +278,15 @@ return {
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -294,7 +294,7 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -308,7 +308,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "mesures(first:1)"
|
||||
"storageKey": "measures(first:1)"
|
||||
},
|
||||
(v7/*: any*/)
|
||||
],
|
||||
@@ -397,16 +397,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "398efd65ce3f24d13b357e8cf32c4f6e",
|
||||
"cacheID": "2d35bb699b87877054e407eccb1c398b",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ListRiskViewPaginationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ListRiskViewPaginationQuery(\n $after: CursorKey\n $before: CursorKey\n $first: Int\n $last: Int\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...ListRiskView_risks_pbnwq\n id\n }\n}\n\nfragment ListRiskView_risks_pbnwq on Organization {\n risks(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n treatment\n description\n category\n createdAt\n updatedAt\n owner {\n id\n fullName\n }\n mesures(first: 1) {\n edges {\n node {\n category\n id\n }\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||
"text": "query ListRiskViewPaginationQuery(\n $after: CursorKey\n $before: CursorKey\n $first: Int\n $last: Int\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...ListRiskView_risks_pbnwq\n id\n }\n}\n\nfragment ListRiskView_risks_pbnwq on Organization {\n risks(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n treatment\n description\n category\n createdAt\n updatedAt\n owner {\n id\n fullName\n }\n measures(first: 1) {\n edges {\n node {\n category\n id\n }\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "3fc46af4f252617f4547c988184bb168";
|
||||
(node as any).hash = "064cf25e6278fd29f1e474d9a65c6d18";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d4fc01f5c38bce1054b2198af7e021f2>>
|
||||
* @generated SignedSource<<c0daa0e600804b3750294c11acacec17>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -280,15 +280,15 @@ return {
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -296,7 +296,7 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -310,7 +310,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "mesures(first:1)"
|
||||
"storageKey": "measures(first:1)"
|
||||
},
|
||||
(v8/*: any*/)
|
||||
],
|
||||
@@ -399,12 +399,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "519139d7f492b8d719abf1b0e788853a",
|
||||
"cacheID": "3e7d8e722a266ae4e1892ad472d29e69",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ListRiskViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ListRiskViewQuery(\n $organizationId: ID!\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...ListRiskView_risks_pbnwq\n }\n}\n\nfragment ListRiskView_risks_pbnwq on Organization {\n risks(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n treatment\n description\n category\n createdAt\n updatedAt\n owner {\n id\n fullName\n }\n mesures(first: 1) {\n edges {\n node {\n category\n id\n }\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||
"text": "query ListRiskViewQuery(\n $organizationId: ID!\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...ListRiskView_risks_pbnwq\n }\n}\n\nfragment ListRiskView_risks_pbnwq on Organization {\n risks(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n treatment\n description\n category\n createdAt\n updatedAt\n owner {\n id\n fullName\n }\n measures(first: 1) {\n edges {\n node {\n category\n id\n }\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1dd4443afe99bdd114d082b0d175776d>>
|
||||
* @generated SignedSource<<ff2ba5959c29398eb8e36b013c459b6b>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -23,7 +23,7 @@ export type ListRiskView_risks$data = {
|
||||
readonly id: string;
|
||||
readonly inherentImpact: number;
|
||||
readonly inherentLikelihood: number;
|
||||
readonly mesures: {
|
||||
readonly measures: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
@@ -247,15 +247,15 @@ return {
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -263,7 +263,7 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -276,7 +276,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "mesures(first:1)"
|
||||
"storageKey": "measures(first:1)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
@@ -359,6 +359,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "3fc46af4f252617f4547c988184bb168";
|
||||
(node as any).hash = "064cf25e6278fd29f1e474d9a65c6d18";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @generated SignedSource<<ac6b4af30ca3e03181512667a7ee6d76>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateRiskMeasureMappingInput = {
|
||||
measureId: string;
|
||||
riskId: string;
|
||||
};
|
||||
export type ShowRiskViewCreateRiskMeasureMappingMutation$variables = {
|
||||
input: CreateRiskMeasureMappingInput;
|
||||
};
|
||||
export type ShowRiskViewCreateRiskMeasureMappingMutation$data = {
|
||||
readonly createRiskMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type ShowRiskViewCreateRiskMeasureMappingMutation = {
|
||||
response: ShowRiskViewCreateRiskMeasureMappingMutation$data;
|
||||
variables: ShowRiskViewCreateRiskMeasureMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "CreateRiskMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createRiskMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "success",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ShowRiskViewCreateRiskMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ShowRiskViewCreateRiskMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f9e85548eb6e6aeb601fc36f92803ab6",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ShowRiskViewCreateRiskMeasureMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ShowRiskViewCreateRiskMeasureMappingMutation(\n $input: CreateRiskMeasureMappingInput!\n) {\n createRiskMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "6246bbb8af3e7c1a2e968eb5482c91ce";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @generated SignedSource<<2cf110e09c6e34e64c013c6fc260e918>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteRiskMeasureMappingInput = {
|
||||
measureId: string;
|
||||
riskId: string;
|
||||
};
|
||||
export type ShowRiskViewDeleteRiskMeasureMappingMutation$variables = {
|
||||
input: DeleteRiskMeasureMappingInput;
|
||||
};
|
||||
export type ShowRiskViewDeleteRiskMeasureMappingMutation$data = {
|
||||
readonly deleteRiskMeasureMapping: {
|
||||
readonly success: boolean;
|
||||
};
|
||||
};
|
||||
export type ShowRiskViewDeleteRiskMeasureMappingMutation = {
|
||||
response: ShowRiskViewDeleteRiskMeasureMappingMutation$data;
|
||||
variables: ShowRiskViewDeleteRiskMeasureMappingMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "DeleteRiskMeasureMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteRiskMeasureMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "success",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ShowRiskViewDeleteRiskMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ShowRiskViewDeleteRiskMeasureMappingMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "76adf5d3867e6179bb11daeda4de9fc5",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ShowRiskViewDeleteRiskMeasureMappingMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ShowRiskViewDeleteRiskMeasureMappingMutation(\n $input: DeleteRiskMeasureMappingInput!\n) {\n deleteRiskMeasureMapping(input: $input) {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "c51d0282a2d54bab88d56d9f2fdc9e49";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1fdd1781c11f4c88aeb14ba52fc3e884>>
|
||||
* @generated SignedSource<<55b3897717ff85153a57b02526644ab8>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,29 +9,29 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ShowRiskViewOrganizationMesuresQuery$variables = {
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ShowRiskViewOrganizationMeasuresQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type ShowRiskViewOrganizationMesuresQuery$data = {
|
||||
export type ShowRiskViewOrganizationMeasuresQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly mesures?: {
|
||||
readonly measures?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ShowRiskViewOrganizationMesuresQuery = {
|
||||
response: ShowRiskViewOrganizationMesuresQuery$data;
|
||||
variables: ShowRiskViewOrganizationMesuresQuery$variables;
|
||||
export type ShowRiskViewOrganizationMeasuresQuery = {
|
||||
response: ShowRiskViewOrganizationMeasuresQuery$data;
|
||||
variables: ShowRiskViewOrganizationMeasuresQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -67,7 +67,7 @@ v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -75,7 +75,7 @@ v4 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -161,7 +161,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ShowRiskViewOrganizationMesuresQuery",
|
||||
"name": "ShowRiskViewOrganizationMeasuresQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -176,11 +176,11 @@ return {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "mesures",
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__Organization__mesures_connection",
|
||||
"name": "__Organization__measures_connection",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -200,7 +200,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ShowRiskViewOrganizationMesuresQuery",
|
||||
"name": "ShowRiskViewOrganizationMeasuresQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -218,21 +218,21 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": (v4/*: any*/),
|
||||
"storageKey": "mesures(first:100)"
|
||||
"storageKey": "measures(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "Organization__mesures",
|
||||
"key": "Organization__measures",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesures"
|
||||
"name": "measures"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
@@ -244,7 +244,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "af9a0c71ad20ea7e65e3c625e30b00d8",
|
||||
"cacheID": "8d3ef87f30b0db1a4805df59ff0703c8",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -254,18 +254,18 @@ return {
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"organization",
|
||||
"mesures"
|
||||
"measures"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "ShowRiskViewOrganizationMesuresQuery",
|
||||
"name": "ShowRiskViewOrganizationMeasuresQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ShowRiskViewOrganizationMesuresQuery(\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"
|
||||
"text": "query ShowRiskViewOrganizationMeasuresQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n measures(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 = "addb9873294354cedf28bc3262cb736a";
|
||||
(node as any).hash = "23094414dbfa064d558c59163678d658";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<5d1745636bcff5f05d946bcd613463e5>>
|
||||
* @generated SignedSource<<48d940f6040fa9375ac915ce8851c658>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type RiskTreatment = "ACCEPTED" | "AVOIDED" | "MITIGATED" | "TRANSFERRED";
|
||||
export type ShowRiskViewQuery$variables = {
|
||||
riskId: string;
|
||||
@@ -32,7 +32,7 @@ export type ShowRiskViewQuery$data = {
|
||||
readonly id: string;
|
||||
readonly inherentImpact?: number;
|
||||
readonly inherentLikelihood?: number;
|
||||
readonly mesures?: {
|
||||
readonly measures?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
@@ -40,7 +40,7 @@ export type ShowRiskViewQuery$data = {
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MesureState;
|
||||
readonly state: MeasureState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
@@ -224,7 +224,7 @@ v17 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MesureEdge",
|
||||
"concreteType": "MeasureEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -232,7 +232,7 @@ v17 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Mesure",
|
||||
"concreteType": "Measure",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -377,11 +377,11 @@ return {
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/),
|
||||
{
|
||||
"alias": "mesures",
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__Risk__mesures_connection",
|
||||
"name": "__Risk__measures_connection",
|
||||
"plural": false,
|
||||
"selections": (v17/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -450,21 +450,21 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v20/*: any*/),
|
||||
"concreteType": "MesureConnection",
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "mesures",
|
||||
"name": "measures",
|
||||
"plural": false,
|
||||
"selections": (v17/*: any*/),
|
||||
"storageKey": "mesures(first:100)"
|
||||
"storageKey": "measures(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v20/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "Risk__mesures",
|
||||
"key": "Risk__measures",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "mesures"
|
||||
"name": "measures"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
@@ -514,7 +514,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "a88eba4c398c292d41deaddd1d77bb3b",
|
||||
"cacheID": "487765d92cad8c0915ad4fee24d7e702",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -524,7 +524,7 @@ return {
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"node",
|
||||
"mesures"
|
||||
"measures"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -549,11 +549,11 @@ return {
|
||||
},
|
||||
"name": "ShowRiskViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ShowRiskViewQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n id\n ... on Risk {\n name\n description\n treatment\n owner {\n id\n fullName\n }\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n note\n createdAt\n updatedAt\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n createdAt\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n policies(first: 100) {\n edges {\n node {\n id\n title\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\n description\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query ShowRiskViewQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n id\n ... on Risk {\n name\n description\n treatment\n owner {\n id\n fullName\n }\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n note\n createdAt\n updatedAt\n measures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n createdAt\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n policies(first: 100) {\n edges {\n node {\n id\n title\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n controls(first: 100) {\n edges {\n node {\n id\n referenceId\n name\n description\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "96158658ecb7c406fc969e086917c03e";
|
||||
(node as any).hash = "b8506a3dd8980cd16b5344b990471533";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -116,11 +116,11 @@ WHERE %s
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Controls) LoadByMesureID(
|
||||
func (c *Controls) LoadByMeasureID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
cursor *page.Cursor[ControlOrderField],
|
||||
) error {
|
||||
q := `
|
||||
@@ -137,9 +137,9 @@ WITH ctrl AS (
|
||||
FROM
|
||||
controls c
|
||||
INNER JOIN
|
||||
controls_mesures cm ON c.id = cm.control_id
|
||||
controls_measures cm ON c.id = cm.control_id
|
||||
WHERE
|
||||
cm.mesure_id = @mesure_id
|
||||
cm.measure_id = @measure_id
|
||||
)
|
||||
SELECT
|
||||
id,
|
||||
@@ -157,7 +157,7 @@ WHERE %s
|
||||
`
|
||||
q = fmt.Sprintf(q, scope.SQLFragment(), cursor.SQLFragment())
|
||||
|
||||
args := pgx.NamedArgs{"mesure_id": mesureID}
|
||||
args := pgx.NamedArgs{"measure_id": measureID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
@@ -200,9 +200,9 @@ WITH ctrl AS (
|
||||
LEFT JOIN
|
||||
risks_policies rp ON cp.policy_id = rp.policy_id
|
||||
LEFT JOIN
|
||||
controls_mesures cm ON c.id = cm.control_id
|
||||
controls_measures cm ON c.id = cm.control_id
|
||||
LEFT JOIN
|
||||
risks_mesures rm ON (rm.mesure_id = cm.mesure_id)
|
||||
risks_measures rm ON (rm.measure_id = cm.measure_id)
|
||||
WHERE
|
||||
rp.risk_id = @risk_id OR rm.risk_id = @risk_id
|
||||
)
|
||||
|
||||
@@ -26,41 +26,41 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
ControlMesure struct {
|
||||
ControlMeasure struct {
|
||||
ControlID gid.GID `db:"control_id"`
|
||||
MesureID gid.GID `db:"mesure_id"`
|
||||
MeasureID gid.GID `db:"measure_id"`
|
||||
TenantID gid.TenantID `db:"tenant_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
||||
|
||||
ControlMesures []*ControlMesure
|
||||
ControlMeasures []*ControlMeasure
|
||||
)
|
||||
|
||||
func (cm ControlMesure) Upsert(
|
||||
func (cm ControlMeasure) Upsert(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
INSERT INTO
|
||||
controls_mesures (
|
||||
controls_measures (
|
||||
control_id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
tenant_id,
|
||||
created_at
|
||||
)
|
||||
VALUES (
|
||||
@control_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@tenant_id,
|
||||
@created_at
|
||||
)
|
||||
ON CONFLICT (control_id, mesure_id) DO NOTHING;
|
||||
ON CONFLICT (control_id, measure_id) DO NOTHING;
|
||||
`
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"control_id": cm.ControlID,
|
||||
"mesure_id": cm.MesureID,
|
||||
"measure_id": cm.MeasureID,
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"created_at": cm.CreatedAt,
|
||||
}
|
||||
@@ -68,22 +68,22 @@ ON CONFLICT (control_id, mesure_id) DO NOTHING;
|
||||
return err
|
||||
}
|
||||
|
||||
func (cm ControlMesure) Insert(
|
||||
func (cm ControlMeasure) Insert(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
INSERT INTO
|
||||
controls_mesures (
|
||||
controls_measures (
|
||||
control_id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
tenant_id,
|
||||
created_at
|
||||
)
|
||||
VALUES (
|
||||
@control_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@tenant_id,
|
||||
@created_at
|
||||
);
|
||||
@@ -91,7 +91,7 @@ VALUES (
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"control_id": cm.ControlID,
|
||||
"mesure_id": cm.MesureID,
|
||||
"measure_id": cm.MeasureID,
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"created_at": cm.CreatedAt,
|
||||
}
|
||||
@@ -99,7 +99,7 @@ VALUES (
|
||||
return err
|
||||
}
|
||||
|
||||
func (cm ControlMesure) Delete(
|
||||
func (cm ControlMeasure) Delete(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
@@ -107,16 +107,16 @@ func (cm ControlMesure) Delete(
|
||||
q := `
|
||||
DELETE
|
||||
FROM
|
||||
controls_mesures
|
||||
controls_measures
|
||||
WHERE
|
||||
%s
|
||||
AND control_id = @control_id
|
||||
AND mesure_id = @mesure_id;
|
||||
AND measure_id = @measure_id;
|
||||
`
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"control_id": cm.ControlID,
|
||||
"mesure_id": cm.MesureID,
|
||||
"measure_id": cm.MeasureID,
|
||||
}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
@@ -125,39 +125,39 @@ WHERE
|
||||
return err
|
||||
}
|
||||
|
||||
func (cms *ControlMesures) LoadByMesureID(
|
||||
func (cms *ControlMeasures) LoadByMeasureID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
control_id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
tenant_id,
|
||||
created_at
|
||||
FROM
|
||||
controls_mesures
|
||||
controls_measures
|
||||
WHERE
|
||||
%s
|
||||
AND mesure_id = @mesure_id
|
||||
AND measure_id = @measure_id
|
||||
`
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"mesure_id": mesureID}
|
||||
args := pgx.StrictNamedArgs{"measure_id": measureID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query control_mesures: %w", err)
|
||||
return fmt.Errorf("cannot query control_measures: %w", err)
|
||||
}
|
||||
|
||||
controlMesures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[ControlMesure])
|
||||
controlMeasures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[ControlMeasure])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect control_mesures: %w", err)
|
||||
return fmt.Errorf("cannot collect control_measures: %w", err)
|
||||
}
|
||||
|
||||
*cms = controlMesures
|
||||
*cms = controlMeasures
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package coredata
|
||||
const (
|
||||
OrganizationEntityType uint16 = iota
|
||||
FrameworkEntityType
|
||||
MesureEntityType
|
||||
MeasureEntityType
|
||||
TaskEntityType
|
||||
EvidenceEntityType
|
||||
ConnectorEntityType
|
||||
|
||||
@@ -28,37 +28,37 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
Mesure struct {
|
||||
Measure 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"`
|
||||
State MesureState `db:"state"`
|
||||
State MeasureState `db:"state"`
|
||||
ReferenceID string `db:"reference_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
Mesures []*Mesure
|
||||
Measures []*Measure
|
||||
)
|
||||
|
||||
func (m Mesure) CursorKey(orderBy MesureOrderField) page.CursorKey {
|
||||
func (m Measure) CursorKey(orderBy MeasureOrderField) page.CursorKey {
|
||||
switch orderBy {
|
||||
case MesureOrderFieldCreatedAt:
|
||||
case MeasureOrderFieldCreatedAt:
|
||||
return page.NewCursorKey(m.ID, m.CreatedAt)
|
||||
}
|
||||
|
||||
panic(fmt.Sprintf("unsupported order by: %s", orderBy))
|
||||
}
|
||||
|
||||
func (m *Mesures) LoadByRiskID(
|
||||
func (m *Measures) LoadByRiskID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
riskID gid.GID,
|
||||
cursor *page.Cursor[MesureOrderField],
|
||||
cursor *page.Cursor[MeasureOrderField],
|
||||
) error {
|
||||
q := `
|
||||
WITH msrs AS (
|
||||
@@ -74,9 +74,9 @@ WITH msrs AS (
|
||||
m.created_at,
|
||||
m.updated_at
|
||||
FROM
|
||||
mesures m
|
||||
measures m
|
||||
INNER JOIN
|
||||
risks_mesures rm ON m.id = rm.mesure_id
|
||||
risks_measures rm ON m.id = rm.measure_id
|
||||
WHERE
|
||||
rm.risk_id = @risk_id
|
||||
)
|
||||
@@ -104,25 +104,25 @@ WHERE %s
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query mesures: %w", err)
|
||||
return fmt.Errorf("cannot query measures: %w", err)
|
||||
}
|
||||
|
||||
mesures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Mesure])
|
||||
measures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Measure])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect mesures: %w", err)
|
||||
return fmt.Errorf("cannot collect measures: %w", err)
|
||||
}
|
||||
|
||||
*m = mesures
|
||||
*m = measures
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mesures) LoadByControlID(
|
||||
func (m *Measures) LoadByControlID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
controlID gid.GID,
|
||||
cursor *page.Cursor[MesureOrderField],
|
||||
cursor *page.Cursor[MeasureOrderField],
|
||||
) error {
|
||||
q := `
|
||||
WITH mtgtns AS (
|
||||
@@ -138,9 +138,9 @@ WITH mtgtns AS (
|
||||
m.created_at,
|
||||
m.updated_at
|
||||
FROM
|
||||
mesures m
|
||||
measures m
|
||||
INNER JOIN
|
||||
controls_mesures cm ON m.id = cm.mesure_id
|
||||
controls_measures cm ON m.id = cm.measure_id
|
||||
WHERE
|
||||
cm.control_id = @control_id
|
||||
)
|
||||
@@ -168,25 +168,25 @@ WHERE %s
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query mesures: %w", err)
|
||||
return fmt.Errorf("cannot query measures: %w", err)
|
||||
}
|
||||
|
||||
mesures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Mesure])
|
||||
measures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Measure])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect mesures: %w", err)
|
||||
return fmt.Errorf("cannot collect measures: %w", err)
|
||||
}
|
||||
|
||||
*m = mesures
|
||||
*m = measures
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mesures) LoadByOrganizationID(
|
||||
func (m *Measures) LoadByOrganizationID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
organizationID gid.GID,
|
||||
cursor *page.Cursor[MesureOrderField],
|
||||
cursor *page.Cursor[MeasureOrderField],
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
@@ -201,7 +201,7 @@ SELECT
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
mesures
|
||||
measures
|
||||
WHERE
|
||||
%s
|
||||
AND organization_id = @organization_id
|
||||
@@ -215,24 +215,24 @@ WHERE
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query mesures: %w", err)
|
||||
return fmt.Errorf("cannot query measures: %w", err)
|
||||
}
|
||||
|
||||
mesures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Mesure])
|
||||
measures, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Measure])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect mesures: %w", err)
|
||||
return fmt.Errorf("cannot collect measures: %w", err)
|
||||
}
|
||||
|
||||
*m = mesures
|
||||
*m = measures
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mesure) LoadByID(
|
||||
func (m *Measure) LoadByID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
@@ -247,41 +247,41 @@ SELECT
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
mesures
|
||||
measures
|
||||
WHERE
|
||||
%s
|
||||
AND id = @mesure_id
|
||||
AND id = @measure_id
|
||||
LIMIT 1;
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"mesure_id": mesureID}
|
||||
args := pgx.StrictNamedArgs{"measure_id": measureID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query mesures: %w", err)
|
||||
return fmt.Errorf("cannot query measures: %w", err)
|
||||
}
|
||||
|
||||
mesure, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[Mesure])
|
||||
measure, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[Measure])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect mesures: %w", err)
|
||||
return fmt.Errorf("cannot collect measures: %w", err)
|
||||
}
|
||||
|
||||
*m = mesure
|
||||
*m = measure
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mesure) Upsert(
|
||||
func (m *Measure) Upsert(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
INSERT INTO
|
||||
mesures (
|
||||
measures (
|
||||
tenant_id,
|
||||
id,
|
||||
organization_id,
|
||||
@@ -295,7 +295,7 @@ INSERT INTO
|
||||
)
|
||||
VALUES (
|
||||
@tenant_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@organization_id,
|
||||
@category,
|
||||
@name,
|
||||
@@ -325,7 +325,7 @@ RETURNING
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"mesure_id": m.ID,
|
||||
"measure_id": m.ID,
|
||||
"organization_id": m.OrganizationID,
|
||||
"category": m.Category,
|
||||
"name": m.Name,
|
||||
@@ -338,27 +338,27 @@ RETURNING
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query mesures: %w", err)
|
||||
return fmt.Errorf("cannot query measures: %w", err)
|
||||
}
|
||||
|
||||
mesure, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[Mesure])
|
||||
measure, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[Measure])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect mesures: %w", err)
|
||||
return fmt.Errorf("cannot collect measures: %w", err)
|
||||
}
|
||||
|
||||
*m = mesure
|
||||
*m = measure
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m Mesure) Insert(
|
||||
func (m Measure) Insert(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
INSERT INTO
|
||||
mesures (
|
||||
measures (
|
||||
tenant_id,
|
||||
id,
|
||||
organization_id,
|
||||
@@ -372,7 +372,7 @@ INSERT INTO
|
||||
)
|
||||
VALUES (
|
||||
@tenant_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@organization_id,
|
||||
@category,
|
||||
@name,
|
||||
@@ -386,7 +386,7 @@ VALUES (
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"mesure_id": m.ID,
|
||||
"measure_id": m.ID,
|
||||
"organization_id": m.OrganizationID,
|
||||
"category": m.Category,
|
||||
"name": m.Name,
|
||||
@@ -400,13 +400,13 @@ VALUES (
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *Mesure) Update(
|
||||
func (m *Measure) Update(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
UPDATE mesures
|
||||
UPDATE measures
|
||||
SET
|
||||
name = @name,
|
||||
description = @description,
|
||||
@@ -414,12 +414,12 @@ SET
|
||||
state = @state,
|
||||
updated_at = @updated_at
|
||||
WHERE %s
|
||||
AND id = @mesure_id
|
||||
AND id = @measure_id
|
||||
`
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.NamedArgs{
|
||||
"mesure_id": m.ID,
|
||||
"measure_id": m.ID,
|
||||
"name": m.Name,
|
||||
"description": m.Description,
|
||||
"category": m.Category,
|
||||
@@ -433,19 +433,19 @@ WHERE %s
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *Mesure) Delete(
|
||||
func (m *Measure) Delete(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
DELETE FROM mesures
|
||||
DELETE FROM measures
|
||||
WHERE %s
|
||||
AND id = @mesure_id
|
||||
AND id = @measure_id
|
||||
`
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"mesure_id": m.ID}
|
||||
args := pgx.StrictNamedArgs{"measure_id": m.ID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
package coredata
|
||||
|
||||
type (
|
||||
MesureOrderField string
|
||||
MeasureOrderField string
|
||||
)
|
||||
|
||||
const (
|
||||
MesureOrderFieldCreatedAt MesureOrderField = "CREATED_AT"
|
||||
MeasureOrderFieldCreatedAt MeasureOrderField = "CREATED_AT"
|
||||
)
|
||||
|
||||
func (p MesureOrderField) Column() string {
|
||||
func (p MeasureOrderField) Column() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p MesureOrderField) String() string {
|
||||
func (p MeasureOrderField) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p MesureOrderField) MarshalText() ([]byte, error) {
|
||||
func (p MeasureOrderField) MarshalText() ([]byte, error) {
|
||||
return []byte(p.String()), nil
|
||||
}
|
||||
|
||||
func (p *MesureOrderField) UnmarshalText(text []byte) error {
|
||||
*p = MesureOrderField(text)
|
||||
func (p *MeasureOrderField) UnmarshalText(text []byte) error {
|
||||
*p = MeasureOrderField(text)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -20,65 +20,65 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
MesureState uint8
|
||||
MeasureState uint8
|
||||
)
|
||||
|
||||
const (
|
||||
MesureStateNotStarted MesureState = iota
|
||||
MesureStateInProgress
|
||||
MesureStateNotApplicable
|
||||
MesureStateImplemented
|
||||
MeasureStateNotStarted MeasureState = iota
|
||||
MeasureStateInProgress
|
||||
MeasureStateNotApplicable
|
||||
MeasureStateImplemented
|
||||
)
|
||||
|
||||
func (ms MesureState) MarshalText() ([]byte, error) {
|
||||
func (ms MeasureState) MarshalText() ([]byte, error) {
|
||||
return []byte(ms.String()), nil
|
||||
}
|
||||
|
||||
func (ms *MesureState) UnmarshalText(data []byte) error {
|
||||
func (ms *MeasureState) UnmarshalText(data []byte) error {
|
||||
val := string(data)
|
||||
|
||||
switch val {
|
||||
case MesureStateNotStarted.String():
|
||||
*ms = MesureStateNotStarted
|
||||
case MesureStateInProgress.String():
|
||||
*ms = MesureStateInProgress
|
||||
case MesureStateNotApplicable.String():
|
||||
*ms = MesureStateNotApplicable
|
||||
case MesureStateImplemented.String():
|
||||
*ms = MesureStateImplemented
|
||||
case MeasureStateNotStarted.String():
|
||||
*ms = MeasureStateNotStarted
|
||||
case MeasureStateInProgress.String():
|
||||
*ms = MeasureStateInProgress
|
||||
case MeasureStateNotApplicable.String():
|
||||
*ms = MeasureStateNotApplicable
|
||||
case MeasureStateImplemented.String():
|
||||
*ms = MeasureStateImplemented
|
||||
default:
|
||||
return fmt.Errorf("invalid MesureState value: %q", val)
|
||||
return fmt.Errorf("invalid MeasureState value: %q", val)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ms MesureState) String() string {
|
||||
func (ms MeasureState) String() string {
|
||||
var val string
|
||||
|
||||
switch ms {
|
||||
case MesureStateNotStarted:
|
||||
case MeasureStateNotStarted:
|
||||
val = "NOT_STARTED"
|
||||
case MesureStateInProgress:
|
||||
case MeasureStateInProgress:
|
||||
val = "IN_PROGRESS"
|
||||
case MesureStateNotApplicable:
|
||||
case MeasureStateNotApplicable:
|
||||
val = "NOT_APPLICABLE"
|
||||
case MesureStateImplemented:
|
||||
case MeasureStateImplemented:
|
||||
val = "IMPLEMENTED"
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
func (ms *MesureState) Scan(value any) error {
|
||||
func (ms *MeasureState) Scan(value any) error {
|
||||
val, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid scan source for MesureState, expected string got %T", value)
|
||||
return fmt.Errorf("invalid scan source for MeasureState, expected string got %T", value)
|
||||
}
|
||||
|
||||
return ms.UnmarshalText([]byte(val))
|
||||
}
|
||||
|
||||
func (ms MesureState) Value() (driver.Value, error) {
|
||||
func (ms MeasureState) Value() (driver.Value, error) {
|
||||
return ms.String(), nil
|
||||
}
|
||||
|
||||
6
pkg/coredata/migrations/20250430T140000Z.sql
Normal file
6
pkg/coredata/migrations/20250430T140000Z.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE mesures RENAME TO measures;
|
||||
ALTER TABLE controls_mesures RENAME TO controls_measures;
|
||||
ALTER TABLE risks_mesures RENAME TO risks_measures;
|
||||
ALTER TABLE tasks RENAME COLUMN mesure_id TO measure_id;
|
||||
ALTER TABLE controls_measures RENAME COLUMN mesure_id TO measure_id;
|
||||
ALTER TABLE risks_measures RENAME COLUMN mesure_id TO measure_id;
|
||||
@@ -64,11 +64,11 @@ func (r *Risk) ResidualSeverity() int {
|
||||
return r.ResidualLikelihood * r.ResidualImpact
|
||||
}
|
||||
|
||||
func (r *Risks) LoadByMesureID(
|
||||
func (r *Risks) LoadByMeasureID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
cursor *page.Cursor[RiskOrderField],
|
||||
) error {
|
||||
q := `
|
||||
@@ -92,9 +92,9 @@ WITH rsks AS (
|
||||
FROM
|
||||
risks r
|
||||
INNER JOIN
|
||||
risks_mesures rm ON r.id = rm.risk_id
|
||||
risks_measures rm ON r.id = rm.risk_id
|
||||
WHERE
|
||||
rm.mesure_id = @mesure_id
|
||||
rm.measure_id = @measure_id
|
||||
)
|
||||
SELECT
|
||||
id,
|
||||
@@ -118,7 +118,7 @@ WHERE %s
|
||||
`
|
||||
q = fmt.Sprintf(q, scope.SQLFragment(), cursor.SQLFragment())
|
||||
|
||||
args := pgx.NamedArgs{"mesure_id": mesureID}
|
||||
args := pgx.NamedArgs{"measure_id": measureID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
|
||||
@@ -26,32 +26,32 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
RiskMesure struct {
|
||||
RiskMeasure struct {
|
||||
RiskID gid.GID `db:"risk_id"`
|
||||
MesureID gid.GID `db:"mesure_id"`
|
||||
MeasureID gid.GID `db:"measure_id"`
|
||||
TenantID gid.TenantID `db:"tenant_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
||||
|
||||
RiskMesures []*RiskMesure
|
||||
RiskMeasures []*RiskMeasure
|
||||
)
|
||||
|
||||
func (rm RiskMesure) Insert(
|
||||
func (rm RiskMeasure) Insert(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
INSERT INTO
|
||||
risks_mesures (
|
||||
risks_measures (
|
||||
risk_id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
tenant_id,
|
||||
created_at
|
||||
)
|
||||
VALUES (
|
||||
@risk_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@tenant_id,
|
||||
@created_at
|
||||
);
|
||||
@@ -59,7 +59,7 @@ VALUES (
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"risk_id": rm.RiskID,
|
||||
"mesure_id": rm.MesureID,
|
||||
"measure_id": rm.MeasureID,
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"created_at": rm.CreatedAt,
|
||||
}
|
||||
@@ -67,7 +67,7 @@ VALUES (
|
||||
return err
|
||||
}
|
||||
|
||||
func (rm RiskMesure) Delete(
|
||||
func (rm RiskMeasure) Delete(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
@@ -75,18 +75,18 @@ func (rm RiskMesure) Delete(
|
||||
q := `
|
||||
DELETE
|
||||
FROM
|
||||
risks_mesures
|
||||
risks_measures
|
||||
WHERE
|
||||
%s
|
||||
AND risk_id = @risk_id
|
||||
AND mesure_id = @mesure_id;
|
||||
AND measure_id = @measure_id;
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"risk_id": rm.RiskID,
|
||||
"mesure_id": rm.MesureID,
|
||||
"risk_id": rm.RiskID,
|
||||
"measure_id": rm.MeasureID,
|
||||
}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
type (
|
||||
Task struct {
|
||||
ID gid.GID `db:"id"`
|
||||
MesureID gid.GID `db:"mesure_id"`
|
||||
MeasureID gid.GID `db:"measure_id"`
|
||||
Name string `db:"name"`
|
||||
Description string `db:"description"`
|
||||
State TaskState `db:"state"`
|
||||
@@ -62,7 +62,7 @@ func (c *Task) LoadByID(
|
||||
q := `
|
||||
SELECT
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
state,
|
||||
@@ -109,7 +109,7 @@ INSERT INTO
|
||||
tasks (
|
||||
tenant_id,
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
reference_id,
|
||||
@@ -122,7 +122,7 @@ INSERT INTO
|
||||
VALUES (
|
||||
@tenant_id,
|
||||
@task_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@name,
|
||||
@description,
|
||||
@reference_id,
|
||||
@@ -137,7 +137,7 @@ VALUES (
|
||||
args := pgx.StrictNamedArgs{
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"task_id": c.ID,
|
||||
"mesure_id": c.MesureID,
|
||||
"measure_id": c.MeasureID,
|
||||
"name": c.Name,
|
||||
"description": c.Description,
|
||||
"reference_id": c.ReferenceID,
|
||||
@@ -161,7 +161,7 @@ INSERT INTO
|
||||
tasks (
|
||||
tenant_id,
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
reference_id,
|
||||
@@ -174,7 +174,7 @@ INSERT INTO
|
||||
VALUES (
|
||||
@tenant_id,
|
||||
@task_id,
|
||||
@mesure_id,
|
||||
@measure_id,
|
||||
@name,
|
||||
@description,
|
||||
@reference_id,
|
||||
@@ -184,13 +184,13 @@ VALUES (
|
||||
@created_at,
|
||||
@updated_at
|
||||
)
|
||||
ON CONFLICT (mesure_id, reference_id) DO UPDATE SET
|
||||
ON CONFLICT (measure_id, reference_id) DO UPDATE SET
|
||||
name = @name,
|
||||
description = @description,
|
||||
updated_at = @updated_at
|
||||
RETURNING
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
reference_id,
|
||||
@@ -204,7 +204,7 @@ RETURNING
|
||||
args := pgx.StrictNamedArgs{
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"task_id": c.ID,
|
||||
"mesure_id": c.MesureID,
|
||||
"measure_id": c.MeasureID,
|
||||
"name": c.Name,
|
||||
"description": c.Description,
|
||||
"reference_id": c.ReferenceID,
|
||||
@@ -229,17 +229,17 @@ RETURNING
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Tasks) LoadByMesureID(
|
||||
func (c *Tasks) LoadByMeasureID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
cursor *page.Cursor[TaskOrderField],
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
state,
|
||||
@@ -252,12 +252,12 @@ FROM
|
||||
tasks
|
||||
WHERE
|
||||
%s
|
||||
AND mesure_id = @mesure_id
|
||||
AND measure_id = @measure_id
|
||||
AND %s
|
||||
`
|
||||
q = fmt.Sprintf(q, scope.SQLFragment(), cursor.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"mesure_id": mesureID}
|
||||
args := pgx.StrictNamedArgs{"measure_id": measureID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
maps.Copy(args, cursor.SQLArguments())
|
||||
|
||||
@@ -323,7 +323,7 @@ WHERE %s
|
||||
AND id = @task_id
|
||||
RETURNING
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
reference_id,
|
||||
@@ -371,7 +371,7 @@ WHERE %s
|
||||
AND id = @task_id
|
||||
RETURNING
|
||||
id,
|
||||
mesure_id,
|
||||
measure_id,
|
||||
name,
|
||||
description,
|
||||
reference_id,
|
||||
|
||||
@@ -76,9 +76,9 @@ func (s ControlService) ListForPolicyID(
|
||||
return page.NewPage(controls, cursor), nil
|
||||
}
|
||||
|
||||
func (s ControlService) ListForMesureID(
|
||||
func (s ControlService) ListForMeasureID(
|
||||
ctx context.Context,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
cursor *page.Cursor[coredata.ControlOrderField],
|
||||
) (*page.Page[*coredata.Control, coredata.ControlOrderField], error) {
|
||||
var controls coredata.Controls
|
||||
@@ -86,7 +86,7 @@ func (s ControlService) ListForMesureID(
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return controls.LoadByMesureID(ctx, conn, s.svc.scope, mesureID, cursor)
|
||||
return controls.LoadByMeasureID(ctx, conn, s.svc.scope, measureID, cursor)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -97,14 +97,14 @@ func (s ControlService) ListForMesureID(
|
||||
return page.NewPage(controls, cursor), nil
|
||||
}
|
||||
|
||||
func (s ControlService) CreateMesureMapping(
|
||||
func (s ControlService) CreateMeasureMapping(
|
||||
ctx context.Context,
|
||||
controlID gid.GID,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
controlMesure := &coredata.ControlMesure{
|
||||
controlMeasure := &coredata.ControlMeasure{
|
||||
ControlID: controlID,
|
||||
MesureID: mesureID,
|
||||
MeasureID: measureID,
|
||||
TenantID: s.svc.scope.GetTenantID(),
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
@@ -112,19 +112,19 @@ func (s ControlService) CreateMesureMapping(
|
||||
return s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return controlMesure.Insert(ctx, conn, s.svc.scope)
|
||||
return controlMeasure.Insert(ctx, conn, s.svc.scope)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
func (s ControlService) DeleteMesureMapping(
|
||||
func (s ControlService) DeleteMeasureMapping(
|
||||
ctx context.Context,
|
||||
controlID gid.GID,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
controlMesure := &coredata.ControlMesure{
|
||||
controlMeasure := &coredata.ControlMeasure{
|
||||
ControlID: controlID,
|
||||
MesureID: mesureID,
|
||||
MeasureID: measureID,
|
||||
TenantID: s.svc.scope.GetTenantID(),
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func (s ControlService) DeleteMesureMapping(
|
||||
return s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return controlMesure.Delete(ctx, conn, s.svc.scope)
|
||||
return controlMeasure.Delete(ctx, conn, s.svc.scope)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -27,27 +27,27 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
MesureService struct {
|
||||
MeasureService struct {
|
||||
svc *TenantService
|
||||
}
|
||||
|
||||
CreateMesureRequest struct {
|
||||
CreateMeasureRequest struct {
|
||||
OrganizationID gid.GID
|
||||
Name string
|
||||
Description string
|
||||
Category string
|
||||
}
|
||||
|
||||
UpdateMesureRequest struct {
|
||||
UpdateMeasureRequest struct {
|
||||
ID gid.GID
|
||||
Name *string
|
||||
Description *string
|
||||
Category *string
|
||||
State *coredata.MesureState
|
||||
State *coredata.MeasureState
|
||||
}
|
||||
|
||||
ImportMesureRequest struct {
|
||||
Mesures []struct {
|
||||
ImportMeasureRequest struct {
|
||||
Measures []struct {
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category"`
|
||||
ReferenceID string `json:"reference-id"`
|
||||
@@ -65,21 +65,21 @@ type (
|
||||
Name string `json:"name"`
|
||||
} `json:"requested-evidences"`
|
||||
} `json:"tasks"`
|
||||
} `json:"mesures"`
|
||||
} `json:"measures"`
|
||||
}
|
||||
)
|
||||
|
||||
func (s MesureService) ListForRiskID(
|
||||
func (s MeasureService) ListForRiskID(
|
||||
ctx context.Context,
|
||||
riskID gid.GID,
|
||||
cursor *page.Cursor[coredata.MesureOrderField],
|
||||
) (*page.Page[*coredata.Mesure, coredata.MesureOrderField], error) {
|
||||
var mesures coredata.Mesures
|
||||
cursor *page.Cursor[coredata.MeasureOrderField],
|
||||
) (*page.Page[*coredata.Measure, coredata.MeasureOrderField], error) {
|
||||
var measures coredata.Measures
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return mesures.LoadByRiskID(ctx, conn, s.svc.scope, riskID, cursor)
|
||||
return measures.LoadByRiskID(ctx, conn, s.svc.scope, riskID, cursor)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -87,20 +87,20 @@ func (s MesureService) ListForRiskID(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return page.NewPage(mesures, cursor), nil
|
||||
return page.NewPage(measures, cursor), nil
|
||||
}
|
||||
|
||||
func (s MesureService) ListForControlID(
|
||||
func (s MeasureService) ListForControlID(
|
||||
ctx context.Context,
|
||||
controlID gid.GID,
|
||||
cursor *page.Cursor[coredata.MesureOrderField],
|
||||
) (*page.Page[*coredata.Mesure, coredata.MesureOrderField], error) {
|
||||
var mesures coredata.Mesures
|
||||
cursor *page.Cursor[coredata.MeasureOrderField],
|
||||
) (*page.Page[*coredata.Measure, coredata.MeasureOrderField], error) {
|
||||
var measures coredata.Measures
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return mesures.LoadByControlID(ctx, conn, s.svc.scope, controlID, cursor)
|
||||
return measures.LoadByControlID(ctx, conn, s.svc.scope, controlID, cursor)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -108,19 +108,19 @@ func (s MesureService) ListForControlID(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return page.NewPage(mesures, cursor), nil
|
||||
return page.NewPage(measures, cursor), nil
|
||||
}
|
||||
|
||||
func (s MesureService) Get(
|
||||
func (s MeasureService) Get(
|
||||
ctx context.Context,
|
||||
mesureID gid.GID,
|
||||
) (*coredata.Mesure, error) {
|
||||
mesure := &coredata.Mesure{}
|
||||
measureID gid.GID,
|
||||
) (*coredata.Measure, error) {
|
||||
measure := &coredata.Measure{}
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return mesure.LoadByID(ctx, conn, s.svc.scope, mesureID)
|
||||
return measure.LoadByID(ctx, conn, s.svc.scope, measureID)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -128,46 +128,46 @@ func (s MesureService) Get(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return mesure, nil
|
||||
return measure, nil
|
||||
}
|
||||
|
||||
func (s MesureService) Import(
|
||||
func (s MeasureService) Import(
|
||||
ctx context.Context,
|
||||
organizationID gid.GID,
|
||||
req ImportMesureRequest,
|
||||
) (*page.Page[*coredata.Mesure, coredata.MesureOrderField], error) {
|
||||
importedMesures := coredata.Mesures{}
|
||||
req ImportMeasureRequest,
|
||||
) (*page.Page[*coredata.Measure, coredata.MeasureOrderField], error) {
|
||||
importedMeasures := coredata.Measures{}
|
||||
|
||||
err := s.svc.pg.WithTx(
|
||||
ctx,
|
||||
func(tx pg.Conn) error {
|
||||
for i := range req.Mesures {
|
||||
for i := range req.Measures {
|
||||
now := time.Now()
|
||||
|
||||
mesureID, err := gid.NewGID(organizationID.TenantID(), coredata.MesureEntityType)
|
||||
measureID, err := gid.NewGID(organizationID.TenantID(), coredata.MeasureEntityType)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create global id: %w", err)
|
||||
}
|
||||
|
||||
mesure := &coredata.Mesure{
|
||||
ID: mesureID,
|
||||
measure := &coredata.Measure{
|
||||
ID: measureID,
|
||||
OrganizationID: organizationID,
|
||||
Name: req.Mesures[i].Name,
|
||||
Name: req.Measures[i].Name,
|
||||
Description: "",
|
||||
Category: req.Mesures[i].Category,
|
||||
State: coredata.MesureStateNotStarted,
|
||||
ReferenceID: req.Mesures[i].ReferenceID,
|
||||
Category: req.Measures[i].Category,
|
||||
State: coredata.MeasureStateNotStarted,
|
||||
ReferenceID: req.Measures[i].ReferenceID,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
importedMesures = append(importedMesures, mesure)
|
||||
importedMeasures = append(importedMeasures, measure)
|
||||
|
||||
if err := mesure.Upsert(ctx, tx, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot upsert mesure: %w", err)
|
||||
if err := measure.Upsert(ctx, tx, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot upsert measure: %w", err)
|
||||
}
|
||||
|
||||
for j := range req.Mesures[i].Tasks {
|
||||
for j := range req.Measures[i].Tasks {
|
||||
taskID, err := gid.NewGID(organizationID.TenantID(), coredata.TaskEntityType)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create global id: %w", err)
|
||||
@@ -175,10 +175,10 @@ func (s MesureService) Import(
|
||||
|
||||
task := &coredata.Task{
|
||||
ID: taskID,
|
||||
MesureID: mesure.ID,
|
||||
Name: req.Mesures[i].Tasks[j].Name,
|
||||
Description: req.Mesures[i].Tasks[j].Description,
|
||||
ReferenceID: req.Mesures[i].Tasks[j].ReferenceID,
|
||||
MeasureID: measure.ID,
|
||||
Name: req.Measures[i].Tasks[j].Name,
|
||||
Description: req.Measures[i].Tasks[j].Description,
|
||||
ReferenceID: req.Measures[i].Tasks[j].ReferenceID,
|
||||
State: coredata.TaskStateTodo,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
@@ -188,7 +188,7 @@ func (s MesureService) Import(
|
||||
return fmt.Errorf("cannot upsert task: %w", err)
|
||||
}
|
||||
|
||||
for k := range req.Mesures[i].Tasks[j].RequestedEvidences {
|
||||
for k := range req.Measures[i].Tasks[j].RequestedEvidences {
|
||||
evidenceID, err := gid.NewGID(organizationID.TenantID(), coredata.EvidenceEntityType)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create global id: %w", err)
|
||||
@@ -198,9 +198,9 @@ func (s MesureService) Import(
|
||||
State: coredata.EvidenceStateRequested,
|
||||
ID: evidenceID,
|
||||
TaskID: task.ID,
|
||||
ReferenceID: req.Mesures[i].Tasks[j].RequestedEvidences[k].ReferenceID,
|
||||
Type: req.Mesures[i].Tasks[j].RequestedEvidences[k].Type,
|
||||
Description: req.Mesures[i].Tasks[j].RequestedEvidences[k].Name,
|
||||
ReferenceID: req.Measures[i].Tasks[j].RequestedEvidences[k].ReferenceID,
|
||||
Type: req.Measures[i].Tasks[j].RequestedEvidences[k].Type,
|
||||
Description: req.Measures[i].Tasks[j].RequestedEvidences[k].Name,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
@@ -211,7 +211,7 @@ func (s MesureService) Import(
|
||||
}
|
||||
}
|
||||
|
||||
for _, standard := range req.Mesures[i].Standards {
|
||||
for _, standard := range req.Measures[i].Standards {
|
||||
framework := &coredata.Framework{}
|
||||
if err := framework.LoadByReferenceID(ctx, tx, s.svc.scope, standard.Framework); err != nil {
|
||||
continue
|
||||
@@ -222,14 +222,14 @@ func (s MesureService) Import(
|
||||
continue
|
||||
}
|
||||
|
||||
controlMesure := &coredata.ControlMesure{
|
||||
controlMeasure := &coredata.ControlMeasure{
|
||||
ControlID: control.ID,
|
||||
MesureID: mesure.ID,
|
||||
MeasureID: measure.ID,
|
||||
CreatedAt: now,
|
||||
}
|
||||
|
||||
if err := controlMesure.Upsert(ctx, tx, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot insert control mesure: %w", err)
|
||||
if err := controlMeasure.Upsert(ctx, tx, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot insert control measure: %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,55 +239,55 @@ func (s MesureService) Import(
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot import mesures: %w", err)
|
||||
return nil, fmt.Errorf("cannot import measures: %w", err)
|
||||
}
|
||||
|
||||
cursor := page.NewCursor(
|
||||
len(importedMesures),
|
||||
len(importedMeasures),
|
||||
nil,
|
||||
page.Head,
|
||||
page.OrderBy[coredata.MesureOrderField]{
|
||||
Field: coredata.MesureOrderFieldCreatedAt,
|
||||
page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: coredata.MeasureOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionAsc,
|
||||
},
|
||||
)
|
||||
|
||||
return page.NewPage(importedMesures, cursor), nil
|
||||
return page.NewPage(importedMeasures, cursor), nil
|
||||
}
|
||||
|
||||
func (s MesureService) Update(
|
||||
func (s MeasureService) Update(
|
||||
ctx context.Context,
|
||||
req UpdateMesureRequest,
|
||||
) (*coredata.Mesure, error) {
|
||||
mesure := &coredata.Mesure{ID: req.ID}
|
||||
req UpdateMeasureRequest,
|
||||
) (*coredata.Measure, error) {
|
||||
measure := &coredata.Measure{ID: req.ID}
|
||||
|
||||
err := s.svc.pg.WithTx(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
if err := mesure.LoadByID(ctx, conn, s.svc.scope, req.ID); err != nil {
|
||||
return fmt.Errorf("cannot load mesure: %w", err)
|
||||
if err := measure.LoadByID(ctx, conn, s.svc.scope, req.ID); err != nil {
|
||||
return fmt.Errorf("cannot load measure: %w", err)
|
||||
}
|
||||
|
||||
if req.Name != nil {
|
||||
mesure.Name = *req.Name
|
||||
measure.Name = *req.Name
|
||||
}
|
||||
|
||||
if req.Description != nil {
|
||||
mesure.Description = *req.Description
|
||||
measure.Description = *req.Description
|
||||
}
|
||||
|
||||
if req.Category != nil {
|
||||
mesure.Category = *req.Category
|
||||
measure.Category = *req.Category
|
||||
}
|
||||
|
||||
if req.State != nil {
|
||||
mesure.State = *req.State
|
||||
measure.State = *req.State
|
||||
}
|
||||
|
||||
mesure.UpdatedAt = time.Now()
|
||||
measure.UpdatedAt = time.Now()
|
||||
|
||||
if err := mesure.Update(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot update mesure: %w", err)
|
||||
if err := measure.Update(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot update measure: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -297,20 +297,20 @@ func (s MesureService) Update(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return mesure, nil
|
||||
return measure, nil
|
||||
}
|
||||
|
||||
func (s MesureService) ListForOrganizationID(
|
||||
func (s MeasureService) ListForOrganizationID(
|
||||
ctx context.Context,
|
||||
organizationID gid.GID,
|
||||
cursor *page.Cursor[coredata.MesureOrderField],
|
||||
) (*page.Page[*coredata.Mesure, coredata.MesureOrderField], error) {
|
||||
var mesures coredata.Mesures
|
||||
cursor *page.Cursor[coredata.MeasureOrderField],
|
||||
) (*page.Page[*coredata.Measure, coredata.MeasureOrderField], error) {
|
||||
var measures coredata.Measures
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return mesures.LoadByOrganizationID(
|
||||
return measures.LoadByOrganizationID(
|
||||
ctx,
|
||||
conn,
|
||||
s.svc.scope,
|
||||
@@ -324,17 +324,17 @@ func (s MesureService) ListForOrganizationID(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return page.NewPage(mesures, cursor), nil
|
||||
return page.NewPage(measures, cursor), nil
|
||||
}
|
||||
|
||||
func (s MesureService) Create(
|
||||
func (s MeasureService) Create(
|
||||
ctx context.Context,
|
||||
req CreateMesureRequest,
|
||||
) (*coredata.Mesure, error) {
|
||||
req CreateMeasureRequest,
|
||||
) (*coredata.Measure, error) {
|
||||
now := time.Now()
|
||||
mesureID, err := gid.NewGID(s.svc.scope.GetTenantID(), coredata.MesureEntityType)
|
||||
measureID, err := gid.NewGID(s.svc.scope.GetTenantID(), coredata.MeasureEntityType)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create mesure global id: %w", err)
|
||||
return nil, fmt.Errorf("cannot create measure global id: %w", err)
|
||||
}
|
||||
|
||||
referenceID, err := uuid.NewV4()
|
||||
@@ -342,14 +342,14 @@ func (s MesureService) Create(
|
||||
return nil, fmt.Errorf("cannot generate reference id: %w", err)
|
||||
}
|
||||
|
||||
mesure := &coredata.Mesure{
|
||||
ID: mesureID,
|
||||
measure := &coredata.Measure{
|
||||
ID: measureID,
|
||||
OrganizationID: req.OrganizationID,
|
||||
Name: req.Name,
|
||||
Description: req.Description,
|
||||
Category: req.Category,
|
||||
ReferenceID: "custom-mesure-" + referenceID.String(),
|
||||
State: coredata.MesureStateNotStarted,
|
||||
ReferenceID: "custom-measure-" + referenceID.String(),
|
||||
State: coredata.MeasureStateNotStarted,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
@@ -357,8 +357,8 @@ func (s MesureService) Create(
|
||||
err = s.svc.pg.WithTx(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
if err := mesure.Insert(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot insert mesure: %w", err)
|
||||
if err := measure.Insert(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot insert measure: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -369,18 +369,18 @@ func (s MesureService) Create(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return mesure, nil
|
||||
return measure, nil
|
||||
}
|
||||
|
||||
func (s MesureService) Delete(
|
||||
func (s MeasureService) Delete(
|
||||
ctx context.Context,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
return s.svc.pg.WithTx(ctx, func(conn pg.Conn) error {
|
||||
mesure := &coredata.Mesure{ID: mesureID}
|
||||
measure := &coredata.Measure{ID: measureID}
|
||||
|
||||
if err := mesure.Delete(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot delete mesure: %w", err)
|
||||
if err := measure.Delete(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot delete measure: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -59,9 +59,9 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (s RiskService) ListForMesureID(
|
||||
func (s RiskService) ListForMeasureID(
|
||||
ctx context.Context,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
cursor *page.Cursor[coredata.RiskOrderField],
|
||||
) (*page.Page[*coredata.Risk, coredata.RiskOrderField], error) {
|
||||
var risks coredata.Risks
|
||||
@@ -69,7 +69,7 @@ func (s RiskService) ListForMesureID(
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return risks.LoadByMesureID(ctx, conn, s.svc.scope, mesureID, cursor)
|
||||
return risks.LoadByMeasureID(ctx, conn, s.svc.scope, measureID, cursor)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -120,14 +120,14 @@ func (s RiskService) DeletePolicyMapping(
|
||||
)
|
||||
}
|
||||
|
||||
func (s RiskService) CreateMesureMapping(
|
||||
func (s RiskService) CreateMeasureMapping(
|
||||
ctx context.Context,
|
||||
riskID gid.GID,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
riskMesure := &coredata.RiskMesure{
|
||||
riskMeasure := &coredata.RiskMeasure{
|
||||
RiskID: riskID,
|
||||
MesureID: mesureID,
|
||||
MeasureID: measureID,
|
||||
TenantID: s.svc.scope.GetTenantID(),
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
@@ -135,19 +135,19 @@ func (s RiskService) CreateMesureMapping(
|
||||
return s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return riskMesure.Insert(ctx, conn, s.svc.scope)
|
||||
return riskMeasure.Insert(ctx, conn, s.svc.scope)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
func (s RiskService) DeleteMesureMapping(
|
||||
func (s RiskService) DeleteMeasureMapping(
|
||||
ctx context.Context,
|
||||
riskID gid.GID,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
) error {
|
||||
riskMesure := &coredata.RiskMesure{
|
||||
riskMeasure := &coredata.RiskMeasure{
|
||||
RiskID: riskID,
|
||||
MesureID: mesureID,
|
||||
MeasureID: measureID,
|
||||
TenantID: s.svc.scope.GetTenantID(),
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
@@ -155,7 +155,7 @@ func (s RiskService) DeleteMesureMapping(
|
||||
return s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return riskMesure.Delete(ctx, conn, s.svc.scope)
|
||||
return riskMeasure.Delete(ctx, conn, s.svc.scope)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ type (
|
||||
hostname string
|
||||
tokenSecret string
|
||||
Frameworks *FrameworkService
|
||||
Mesures *MesureService
|
||||
Measures *MeasureService
|
||||
Tasks *TaskService
|
||||
Evidences *EvidenceService
|
||||
Organizations *OrganizationService
|
||||
@@ -95,7 +95,7 @@ func (s *Service) WithTenant(tenantID gid.TenantID) *TenantService {
|
||||
}
|
||||
|
||||
tenantService.Frameworks = &FrameworkService{svc: tenantService}
|
||||
tenantService.Mesures = &MesureService{svc: tenantService}
|
||||
tenantService.Measures = &MeasureService{svc: tenantService}
|
||||
tenantService.Tasks = &TaskService{svc: tenantService}
|
||||
tenantService.Evidences = &EvidenceService{svc: tenantService}
|
||||
tenantService.Peoples = &PeopleService{svc: tenantService}
|
||||
|
||||
@@ -32,7 +32,7 @@ type (
|
||||
}
|
||||
|
||||
CreateTaskRequest struct {
|
||||
MesureID gid.GID
|
||||
MeasureID gid.GID
|
||||
Name string
|
||||
Description string
|
||||
TimeEstimate *time.Duration
|
||||
@@ -65,7 +65,7 @@ func (s TaskService) Create(
|
||||
|
||||
task := &coredata.Task{
|
||||
ID: taskID,
|
||||
MesureID: req.MesureID,
|
||||
MeasureID: req.MeasureID,
|
||||
Name: req.Name,
|
||||
Description: req.Description,
|
||||
TimeEstimate: req.TimeEstimate,
|
||||
@@ -215,9 +215,9 @@ func (s TaskService) Delete(
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s TaskService) ListForMesureID(
|
||||
func (s TaskService) ListForMeasureID(
|
||||
ctx context.Context,
|
||||
mesureID gid.GID,
|
||||
measureID gid.GID,
|
||||
cursor *page.Cursor[coredata.TaskOrderField],
|
||||
) (*page.Page[*coredata.Task, coredata.TaskOrderField], error) {
|
||||
var tasks coredata.Tasks
|
||||
@@ -225,11 +225,11 @@ func (s TaskService) ListForMesureID(
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return tasks.LoadByMesureID(
|
||||
return tasks.LoadByMeasureID(
|
||||
ctx,
|
||||
conn,
|
||||
s.svc.scope,
|
||||
mesureID,
|
||||
measureID,
|
||||
cursor,
|
||||
)
|
||||
},
|
||||
|
||||
@@ -40,23 +40,23 @@ enum OrderDirection
|
||||
DESC @goEnum(value: "github.com/getprobo/probo/pkg/page.OrderDirectionDesc")
|
||||
}
|
||||
|
||||
enum MesureState
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.MesureState") {
|
||||
enum MeasureState
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.MeasureState") {
|
||||
NOT_STARTED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MesureStateNotStarted"
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MeasureStateNotStarted"
|
||||
)
|
||||
IN_PROGRESS
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MesureStateInProgress"
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MeasureStateInProgress"
|
||||
)
|
||||
NOT_APPLICABLE
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MesureStateNotApplicable"
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MeasureStateNotApplicable"
|
||||
)
|
||||
IMPLEMENTED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MesureStateImplemented"
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MeasureStateImplemented"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -170,11 +170,11 @@ enum ControlOrderField
|
||||
)
|
||||
}
|
||||
|
||||
enum MesureOrderField
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.MesureOrderField") {
|
||||
enum MeasureOrderField
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.MeasureOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MesureOrderFieldCreatedAt"
|
||||
value: "github.com/getprobo/probo/pkg/coredata.MeasureOrderFieldCreatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -321,12 +321,12 @@ input ControlOrder
|
||||
field: ControlOrderField!
|
||||
}
|
||||
|
||||
input MesureOrder
|
||||
input MeasureOrder
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.MesureOrderBy"
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.MeasureOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: MesureOrderField!
|
||||
field: MeasureOrderField!
|
||||
}
|
||||
|
||||
input TaskOrder
|
||||
@@ -445,13 +445,13 @@ type Organization implements Node {
|
||||
orderBy: PolicyOrder
|
||||
): PolicyConnection! @goField(forceResolver: true)
|
||||
|
||||
mesures(
|
||||
measures(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: MesureOrder
|
||||
): MesureConnection! @goField(forceResolver: true)
|
||||
orderBy: MeasureOrder
|
||||
): MeasureConnection! @goField(forceResolver: true)
|
||||
|
||||
risks(
|
||||
first: Int
|
||||
@@ -571,13 +571,13 @@ type Control implements Node {
|
||||
name: String!
|
||||
description: String!
|
||||
|
||||
mesures(
|
||||
measures(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: MesureOrder
|
||||
): MesureConnection! @goField(forceResolver: true)
|
||||
orderBy: MeasureOrder
|
||||
): MeasureConnection! @goField(forceResolver: true)
|
||||
|
||||
policies(
|
||||
first: Int
|
||||
@@ -591,12 +591,12 @@ type Control implements Node {
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
|
||||
type Mesure implements Node {
|
||||
type Measure implements Node {
|
||||
id: ID!
|
||||
category: String!
|
||||
name: String!
|
||||
description: String!
|
||||
state: MesureState!
|
||||
state: MeasureState!
|
||||
|
||||
tasks(
|
||||
first: Int
|
||||
@@ -705,13 +705,13 @@ type Risk implements Node {
|
||||
|
||||
owner: People @goField(forceResolver: true)
|
||||
|
||||
mesures(
|
||||
measures(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: MesureOrder
|
||||
): MesureConnection! @goField(forceResolver: true)
|
||||
orderBy: MeasureOrder
|
||||
): MeasureConnection! @goField(forceResolver: true)
|
||||
|
||||
policies(
|
||||
first: Int
|
||||
@@ -812,14 +812,14 @@ type ControlEdge {
|
||||
node: Control!
|
||||
}
|
||||
|
||||
type MesureConnection {
|
||||
edges: [MesureEdge!]!
|
||||
type MeasureConnection {
|
||||
edges: [MeasureEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type MesureEdge {
|
||||
type MeasureEdge {
|
||||
cursor: CursorKey!
|
||||
node: Mesure!
|
||||
node: Measure!
|
||||
}
|
||||
|
||||
type TaskConnection {
|
||||
@@ -941,22 +941,22 @@ type Mutation {
|
||||
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
|
||||
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
|
||||
|
||||
# Mesure mutations
|
||||
createMesure(input: CreateMesureInput!): CreateMesurePayload!
|
||||
updateMesure(input: UpdateMesureInput!): UpdateMesurePayload!
|
||||
importMesure(input: ImportMesureInput!): ImportMesurePayload!
|
||||
deleteMesure(input: DeleteMesureInput!): DeleteMesurePayload!
|
||||
# Measure mutations
|
||||
createMeasure(input: CreateMeasureInput!): CreateMeasurePayload!
|
||||
updateMeasure(input: UpdateMeasureInput!): UpdateMeasurePayload!
|
||||
importMeasure(input: ImportMeasureInput!): ImportMeasurePayload!
|
||||
deleteMeasure(input: DeleteMeasureInput!): DeleteMeasurePayload!
|
||||
|
||||
# Control mutations
|
||||
createControlMesureMapping(
|
||||
input: CreateControlMesureMappingInput!
|
||||
): CreateControlMesureMappingPayload!
|
||||
createControlMeasureMapping(
|
||||
input: CreateControlMeasureMappingInput!
|
||||
): CreateControlMeasureMappingPayload!
|
||||
createControlPolicyMapping(
|
||||
input: CreateControlPolicyMappingInput!
|
||||
): CreateControlPolicyMappingPayload!
|
||||
deleteControlMesureMapping(
|
||||
input: DeleteControlMesureMappingInput!
|
||||
): DeleteControlMesureMappingPayload!
|
||||
deleteControlMeasureMapping(
|
||||
input: DeleteControlMeasureMappingInput!
|
||||
): DeleteControlMeasureMappingPayload!
|
||||
deleteControlPolicyMapping(
|
||||
input: DeleteControlPolicyMappingInput!
|
||||
): DeleteControlPolicyMappingPayload!
|
||||
@@ -972,12 +972,12 @@ type Mutation {
|
||||
createRisk(input: CreateRiskInput!): CreateRiskPayload!
|
||||
updateRisk(input: UpdateRiskInput!): UpdateRiskPayload!
|
||||
deleteRisk(input: DeleteRiskInput!): DeleteRiskPayload!
|
||||
createRiskMesureMapping(
|
||||
input: CreateRiskMesureMappingInput!
|
||||
): CreateRiskMesureMappingPayload!
|
||||
deleteRiskMesureMapping(
|
||||
input: DeleteRiskMesureMappingInput!
|
||||
): DeleteRiskMesureMappingPayload!
|
||||
createRiskMeasureMapping(
|
||||
input: CreateRiskMeasureMappingInput!
|
||||
): CreateRiskMeasureMappingPayload!
|
||||
deleteRiskMeasureMapping(
|
||||
input: DeleteRiskMeasureMappingInput!
|
||||
): DeleteRiskMeasureMappingPayload!
|
||||
|
||||
createRiskPolicyMapping(
|
||||
input: CreateRiskPolicyMappingInput!
|
||||
@@ -1116,28 +1116,28 @@ input DeleteFrameworkInput {
|
||||
frameworkId: ID!
|
||||
}
|
||||
|
||||
input CreateMesureInput {
|
||||
input CreateMeasureInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
category: String!
|
||||
}
|
||||
|
||||
input UpdateMesureInput {
|
||||
input UpdateMeasureInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String
|
||||
category: String
|
||||
state: MesureState
|
||||
state: MeasureState
|
||||
}
|
||||
|
||||
input ImportMesureInput {
|
||||
input ImportMeasureInput {
|
||||
organizationId: ID!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input CreateTaskInput {
|
||||
mesureId: ID!
|
||||
measureId: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
timeEstimate: Duration
|
||||
@@ -1165,9 +1165,9 @@ input UnassignTaskInput {
|
||||
taskId: ID!
|
||||
}
|
||||
|
||||
input CreateControlMesureMappingInput {
|
||||
input CreateControlMeasureMappingInput {
|
||||
controlId: ID!
|
||||
mesureId: ID!
|
||||
measureId: ID!
|
||||
}
|
||||
|
||||
input CreateControlPolicyMappingInput {
|
||||
@@ -1175,9 +1175,9 @@ input CreateControlPolicyMappingInput {
|
||||
policyId: ID!
|
||||
}
|
||||
|
||||
input DeleteControlMesureMappingInput {
|
||||
input DeleteControlMeasureMappingInput {
|
||||
controlId: ID!
|
||||
mesureId: ID!
|
||||
measureId: ID!
|
||||
}
|
||||
|
||||
input DeleteControlPolicyMappingInput {
|
||||
@@ -1217,14 +1217,14 @@ input DeleteRiskInput {
|
||||
riskId: ID!
|
||||
}
|
||||
|
||||
input CreateRiskMesureMappingInput {
|
||||
input CreateRiskMeasureMappingInput {
|
||||
riskId: ID!
|
||||
mesureId: ID!
|
||||
measureId: ID!
|
||||
}
|
||||
|
||||
input DeleteRiskMesureMappingInput {
|
||||
input DeleteRiskMeasureMappingInput {
|
||||
riskId: ID!
|
||||
mesureId: ID!
|
||||
measureId: ID!
|
||||
}
|
||||
|
||||
input CreateRiskPolicyMappingInput {
|
||||
@@ -1363,16 +1363,16 @@ type DeleteFrameworkPayload {
|
||||
deletedFrameworkId: ID!
|
||||
}
|
||||
|
||||
type CreateMesurePayload {
|
||||
mesureEdge: MesureEdge!
|
||||
type CreateMeasurePayload {
|
||||
measureEdge: MeasureEdge!
|
||||
}
|
||||
|
||||
type UpdateMesurePayload {
|
||||
mesure: Mesure!
|
||||
type UpdateMeasurePayload {
|
||||
measure: Measure!
|
||||
}
|
||||
|
||||
type ImportMesurePayload {
|
||||
mesureEdges: [MesureEdge!]!
|
||||
type ImportMeasurePayload {
|
||||
measureEdges: [MeasureEdge!]!
|
||||
}
|
||||
|
||||
type CreateTaskPayload {
|
||||
@@ -1395,7 +1395,7 @@ type UnassignTaskPayload {
|
||||
task: Task!
|
||||
}
|
||||
|
||||
type CreateControlMesureMappingPayload {
|
||||
type CreateControlMeasureMappingPayload {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
@@ -1403,7 +1403,7 @@ type CreateControlPolicyMappingPayload {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
type DeleteControlMesureMappingPayload {
|
||||
type DeleteControlMeasureMappingPayload {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
@@ -1423,11 +1423,11 @@ type DeleteRiskPayload {
|
||||
deletedRiskId: ID!
|
||||
}
|
||||
|
||||
type CreateRiskMesureMappingPayload {
|
||||
type CreateRiskMeasureMappingPayload {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
type DeleteRiskMesureMappingPayload {
|
||||
type DeleteRiskMeasureMappingPayload {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
@@ -1535,12 +1535,12 @@ type CreateVendorRiskAssessmentPayload {
|
||||
vendorRiskAssessmentEdge: VendorRiskAssessmentEdge!
|
||||
}
|
||||
|
||||
input DeleteMesureInput {
|
||||
mesureId: ID!
|
||||
input DeleteMeasureInput {
|
||||
measureId: ID!
|
||||
}
|
||||
|
||||
type DeleteMesurePayload {
|
||||
deletedMesureId: ID!
|
||||
type DeleteMeasurePayload {
|
||||
deletedMeasureId: ID!
|
||||
}
|
||||
|
||||
type PolicyVersion implements Node {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,31 +20,31 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
MesureOrderBy OrderBy[coredata.MesureOrderField]
|
||||
MeasureOrderBy OrderBy[coredata.MeasureOrderField]
|
||||
)
|
||||
|
||||
func NewMesureConnection(p *page.Page[*coredata.Mesure, coredata.MesureOrderField]) *MesureConnection {
|
||||
var edges = make([]*MesureEdge, len(p.Data))
|
||||
func NewMeasureConnection(p *page.Page[*coredata.Measure, coredata.MeasureOrderField]) *MeasureConnection {
|
||||
var edges = make([]*MeasureEdge, len(p.Data))
|
||||
|
||||
for i := range edges {
|
||||
edges[i] = NewMesureEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
edges[i] = NewMeasureEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &MesureConnection{
|
||||
return &MeasureConnection{
|
||||
Edges: edges,
|
||||
PageInfo: NewPageInfo(p),
|
||||
}
|
||||
}
|
||||
|
||||
func NewMesureEdge(c *coredata.Mesure, orderBy coredata.MesureOrderField) *MesureEdge {
|
||||
return &MesureEdge{
|
||||
func NewMeasureEdge(c *coredata.Measure, orderBy coredata.MeasureOrderField) *MeasureEdge {
|
||||
return &MeasureEdge{
|
||||
Cursor: c.CursorKey(orderBy),
|
||||
Node: NewMesure(c),
|
||||
Node: NewMeasure(c),
|
||||
}
|
||||
}
|
||||
|
||||
func NewMesure(c *coredata.Mesure) *Mesure {
|
||||
return &Mesure{
|
||||
func NewMeasure(c *coredata.Measure) *Measure {
|
||||
return &Measure{
|
||||
ID: c.ID,
|
||||
Category: c.Category,
|
||||
Name: c.Name,
|
||||
|
||||
@@ -63,14 +63,14 @@ type ConnectorOrder struct {
|
||||
}
|
||||
|
||||
type Control struct {
|
||||
ID gid.GID `json:"id"`
|
||||
ReferenceID string `json:"referenceId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Mesures *MesureConnection `json:"mesures"`
|
||||
Policies *PolicyConnection `json:"policies"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ID gid.GID `json:"id"`
|
||||
ReferenceID string `json:"referenceId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Measures *MeasureConnection `json:"measures"`
|
||||
Policies *PolicyConnection `json:"policies"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (Control) IsNode() {}
|
||||
@@ -86,12 +86,12 @@ type ControlEdge struct {
|
||||
Node *Control `json:"node"`
|
||||
}
|
||||
|
||||
type CreateControlMesureMappingInput struct {
|
||||
type CreateControlMeasureMappingInput struct {
|
||||
ControlID gid.GID `json:"controlId"`
|
||||
MesureID gid.GID `json:"mesureId"`
|
||||
MeasureID gid.GID `json:"measureId"`
|
||||
}
|
||||
|
||||
type CreateControlMesureMappingPayload struct {
|
||||
type CreateControlMeasureMappingPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
@@ -135,15 +135,15 @@ type CreateFrameworkPayload struct {
|
||||
FrameworkEdge *FrameworkEdge `json:"frameworkEdge"`
|
||||
}
|
||||
|
||||
type CreateMesureInput struct {
|
||||
type CreateMeasureInput struct {
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
}
|
||||
|
||||
type CreateMesurePayload struct {
|
||||
MesureEdge *MesureEdge `json:"mesureEdge"`
|
||||
type CreateMeasurePayload struct {
|
||||
MeasureEdge *MeasureEdge `json:"measureEdge"`
|
||||
}
|
||||
|
||||
type CreateOrganizationInput struct {
|
||||
@@ -192,12 +192,12 @@ type CreateRiskInput struct {
|
||||
Note *string `json:"note,omitempty"`
|
||||
}
|
||||
|
||||
type CreateRiskMesureMappingInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
MesureID gid.GID `json:"mesureId"`
|
||||
type CreateRiskMeasureMappingInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
MeasureID gid.GID `json:"measureId"`
|
||||
}
|
||||
|
||||
type CreateRiskMesureMappingPayload struct {
|
||||
type CreateRiskMeasureMappingPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ type CreateRiskPolicyMappingPayload struct {
|
||||
}
|
||||
|
||||
type CreateTaskInput struct {
|
||||
MesureID gid.GID `json:"mesureId"`
|
||||
MeasureID gid.GID `json:"measureId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
TimeEstimate *time.Duration `json:"timeEstimate,omitempty"`
|
||||
@@ -265,12 +265,12 @@ type CreateVendorRiskAssessmentPayload struct {
|
||||
VendorRiskAssessmentEdge *VendorRiskAssessmentEdge `json:"vendorRiskAssessmentEdge"`
|
||||
}
|
||||
|
||||
type DeleteControlMesureMappingInput struct {
|
||||
type DeleteControlMeasureMappingInput struct {
|
||||
ControlID gid.GID `json:"controlId"`
|
||||
MesureID gid.GID `json:"mesureId"`
|
||||
MeasureID gid.GID `json:"measureId"`
|
||||
}
|
||||
|
||||
type DeleteControlMesureMappingPayload struct {
|
||||
type DeleteControlMeasureMappingPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
@@ -299,12 +299,12 @@ type DeleteFrameworkPayload struct {
|
||||
DeletedFrameworkID gid.GID `json:"deletedFrameworkId"`
|
||||
}
|
||||
|
||||
type DeleteMesureInput struct {
|
||||
MesureID gid.GID `json:"mesureId"`
|
||||
type DeleteMeasureInput struct {
|
||||
MeasureID gid.GID `json:"measureId"`
|
||||
}
|
||||
|
||||
type DeleteMesurePayload struct {
|
||||
DeletedMesureID gid.GID `json:"deletedMesureId"`
|
||||
type DeleteMeasurePayload struct {
|
||||
DeletedMeasureID gid.GID `json:"deletedMeasureId"`
|
||||
}
|
||||
|
||||
type DeleteOrganizationInput struct {
|
||||
@@ -335,12 +335,12 @@ type DeleteRiskInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
}
|
||||
|
||||
type DeleteRiskMesureMappingInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
MesureID gid.GID `json:"mesureId"`
|
||||
type DeleteRiskMeasureMappingInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
MeasureID gid.GID `json:"measureId"`
|
||||
}
|
||||
|
||||
type DeleteRiskMesureMappingPayload struct {
|
||||
type DeleteRiskMeasureMappingPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
@@ -450,13 +450,13 @@ type ImportFrameworkPayload struct {
|
||||
FrameworkEdge *FrameworkEdge `json:"frameworkEdge"`
|
||||
}
|
||||
|
||||
type ImportMesureInput struct {
|
||||
type ImportMeasureInput struct {
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
File graphql.Upload `json:"file"`
|
||||
}
|
||||
|
||||
type ImportMesurePayload struct {
|
||||
MesureEdges []*MesureEdge `json:"mesureEdges"`
|
||||
type ImportMeasurePayload struct {
|
||||
MeasureEdges []*MeasureEdge `json:"measureEdges"`
|
||||
}
|
||||
|
||||
type InviteUserInput struct {
|
||||
@@ -469,30 +469,30 @@ type InviteUserPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
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"`
|
||||
Tasks *TaskConnection `json:"tasks"`
|
||||
Risks *RiskConnection `json:"risks"`
|
||||
Controls *ControlConnection `json:"controls"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
type Measure struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Category string `json:"category"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
State coredata.MeasureState `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() {}
|
||||
func (this Mesure) GetID() gid.GID { return this.ID }
|
||||
func (Measure) IsNode() {}
|
||||
func (this Measure) GetID() gid.GID { return this.ID }
|
||||
|
||||
type MesureConnection struct {
|
||||
Edges []*MesureEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
type MeasureConnection struct {
|
||||
Edges []*MeasureEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type MesureEdge struct {
|
||||
type MeasureEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *Mesure `json:"node"`
|
||||
Node *Measure `json:"node"`
|
||||
}
|
||||
|
||||
type Mutation struct {
|
||||
@@ -508,7 +508,7 @@ type Organization struct {
|
||||
Vendors *VendorConnection `json:"vendors"`
|
||||
Peoples *PeopleConnection `json:"peoples"`
|
||||
Policies *PolicyConnection `json:"policies"`
|
||||
Mesures *MesureConnection `json:"mesures"`
|
||||
Measures *MeasureConnection `json:"measures"`
|
||||
Risks *RiskConnection `json:"risks"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
@@ -703,7 +703,7 @@ type Risk struct {
|
||||
ResidualSeverity int `json:"residualSeverity"`
|
||||
Note string `json:"note"`
|
||||
Owner *People `json:"owner,omitempty"`
|
||||
Mesures *MesureConnection `json:"mesures"`
|
||||
Measures *MeasureConnection `json:"measures"`
|
||||
Policies *PolicyConnection `json:"policies"`
|
||||
Controls *ControlConnection `json:"controls"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
@@ -779,16 +779,16 @@ type UpdateFrameworkPayload struct {
|
||||
Framework *Framework `json:"framework"`
|
||||
}
|
||||
|
||||
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"`
|
||||
type UpdateMeasureInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
State *coredata.MeasureState `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateMesurePayload struct {
|
||||
Mesure *Mesure `json:"mesure"`
|
||||
type UpdateMeasurePayload struct {
|
||||
Measure *Measure `json:"measure"`
|
||||
}
|
||||
|
||||
type UpdateOrganizationInput struct {
|
||||
|
||||
@@ -20,16 +20,16 @@ import (
|
||||
"github.com/vektah/gqlparser/v2/gqlerror"
|
||||
)
|
||||
|
||||
// Mesures is the resolver for the mesures field.
|
||||
func (r *controlResolver) Mesures(ctx context.Context, obj *types.Control, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MesureOrderBy) (*types.MesureConnection, error) {
|
||||
// Measures is the resolver for the measures field.
|
||||
func (r *controlResolver) Measures(ctx context.Context, obj *types.Control, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MeasureOrderBy) (*types.MeasureConnection, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.MesureOrderField]{
|
||||
Field: coredata.MesureOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: coredata.MeasureOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.MesureOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -37,12 +37,12 @@ func (r *controlResolver) Mesures(ctx context.Context, obj *types.Control, first
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := svc.Mesures.ListForControlID(ctx, obj.ID, cursor)
|
||||
page, err := svc.Measures.ListForControlID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot list mesures: %w", err)
|
||||
return nil, fmt.Errorf("cannot list measures: %w", err)
|
||||
}
|
||||
|
||||
return types.NewMesureConnection(page), nil
|
||||
return types.NewMeasureConnection(page), nil
|
||||
}
|
||||
|
||||
// Policies is the resolver for the policies field.
|
||||
@@ -113,7 +113,7 @@ func (r *frameworkResolver) Controls(ctx context.Context, obj *types.Framework,
|
||||
}
|
||||
|
||||
// Tasks is the resolver for the tasks field.
|
||||
func (r *mesureResolver) Tasks(ctx context.Context, obj *types.Mesure, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.TaskOrderBy) (*types.TaskConnection, error) {
|
||||
func (r *measureResolver) Tasks(ctx context.Context, obj *types.Measure, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.TaskOrderBy) (*types.TaskConnection, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.TaskOrderField]{
|
||||
@@ -129,16 +129,16 @@ func (r *mesureResolver) Tasks(ctx context.Context, obj *types.Mesure, first *in
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := svc.Tasks.ListForMesureID(ctx, obj.ID, cursor)
|
||||
page, err := svc.Tasks.ListForMeasureID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot list mesure tasks: %w", err)
|
||||
return nil, fmt.Errorf("cannot list measure tasks: %w", err)
|
||||
}
|
||||
|
||||
return types.NewTaskConnection(page), nil
|
||||
}
|
||||
|
||||
// Risks is the resolver for the risks field.
|
||||
func (r *mesureResolver) Risks(ctx context.Context, obj *types.Mesure, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.RiskOrderBy) (*types.RiskConnection, error) {
|
||||
func (r *measureResolver) Risks(ctx context.Context, obj *types.Measure, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.RiskOrderBy) (*types.RiskConnection, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.RiskOrderField]{
|
||||
@@ -154,16 +154,16 @@ func (r *mesureResolver) Risks(ctx context.Context, obj *types.Mesure, first *in
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := svc.Risks.ListForMesureID(ctx, obj.ID, cursor)
|
||||
page, err := svc.Risks.ListForMeasureID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot list mesure risks: %w", err)
|
||||
return nil, fmt.Errorf("cannot list measure risks: %w", err)
|
||||
}
|
||||
|
||||
return types.NewRiskConnection(page), nil
|
||||
}
|
||||
|
||||
// Controls is the resolver for the controls field.
|
||||
func (r *mesureResolver) Controls(ctx context.Context, obj *types.Mesure, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ControlOrderBy) (*types.ControlConnection, error) {
|
||||
func (r *measureResolver) Controls(ctx context.Context, obj *types.Measure, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ControlOrderBy) (*types.ControlConnection, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.ControlOrderField]{
|
||||
@@ -179,9 +179,9 @@ func (r *mesureResolver) Controls(ctx context.Context, obj *types.Mesure, first
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := svc.Controls.ListForMesureID(ctx, obj.ID, cursor)
|
||||
page, err := svc.Controls.ListForMeasureID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot list mesure controls: %w", err)
|
||||
return nil, fmt.Errorf("cannot list measure controls: %w", err)
|
||||
}
|
||||
|
||||
return types.NewControlConnection(page), nil
|
||||
@@ -530,30 +530,30 @@ func (r *mutationResolver) DeleteFramework(ctx context.Context, input types.Dele
|
||||
}, nil
|
||||
}
|
||||
|
||||
// // CreateMesure is the resolver for the createMesure field.
|
||||
func (r *mutationResolver) CreateMesure(ctx context.Context, input types.CreateMesureInput) (*types.CreateMesurePayload, error) {
|
||||
// // CreateMeasure is the resolver for the createMeasure field.
|
||||
func (r *mutationResolver) CreateMeasure(ctx context.Context, input types.CreateMeasureInput) (*types.CreateMeasurePayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.OrganizationID.TenantID())
|
||||
|
||||
mesure, err := svc.Mesures.Create(ctx, probo.CreateMesureRequest{
|
||||
measure, err := svc.Measures.Create(ctx, probo.CreateMeasureRequest{
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
Category: input.Category,
|
||||
})
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot create mesure: %w", err))
|
||||
panic(fmt.Errorf("cannot create measure: %w", err))
|
||||
}
|
||||
|
||||
return &types.CreateMesurePayload{
|
||||
MesureEdge: types.NewMesureEdge(mesure, coredata.MesureOrderFieldCreatedAt),
|
||||
return &types.CreateMeasurePayload{
|
||||
MeasureEdge: types.NewMeasureEdge(measure, coredata.MeasureOrderFieldCreatedAt),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UpdateMesure is the resolver for the updateMesure field.
|
||||
func (r *mutationResolver) UpdateMesure(ctx context.Context, input types.UpdateMesureInput) (*types.UpdateMesurePayload, error) {
|
||||
// UpdateMeasure is the resolver for the updateMeasure field.
|
||||
func (r *mutationResolver) UpdateMeasure(ctx context.Context, input types.UpdateMeasureInput) (*types.UpdateMeasurePayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.ID.TenantID())
|
||||
|
||||
mesure, err := svc.Mesures.Update(ctx, probo.UpdateMesureRequest{
|
||||
measure, err := svc.Measures.Update(ctx, probo.UpdateMeasureRequest{
|
||||
ID: input.ID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
@@ -561,62 +561,62 @@ func (r *mutationResolver) UpdateMesure(ctx context.Context, input types.UpdateM
|
||||
State: input.State,
|
||||
})
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot update mesure: %w", err))
|
||||
panic(fmt.Errorf("cannot update measure: %w", err))
|
||||
}
|
||||
|
||||
return &types.UpdateMesurePayload{
|
||||
Mesure: types.NewMesure(mesure),
|
||||
return &types.UpdateMeasurePayload{
|
||||
Measure: types.NewMeasure(measure),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ImportMesure is the resolver for the importMesure field.
|
||||
func (r *mutationResolver) ImportMesure(ctx context.Context, input types.ImportMesureInput) (*types.ImportMesurePayload, error) {
|
||||
// ImportMeasure is the resolver for the importMeasure field.
|
||||
func (r *mutationResolver) ImportMeasure(ctx context.Context, input types.ImportMeasureInput) (*types.ImportMeasurePayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.OrganizationID.TenantID())
|
||||
|
||||
var req probo.ImportMesureRequest
|
||||
if err := json.NewDecoder(input.File.File).Decode(&req.Mesures); err != nil {
|
||||
return nil, fmt.Errorf("cannot unmarshal mesure: %w", err)
|
||||
var req probo.ImportMeasureRequest
|
||||
if err := json.NewDecoder(input.File.File).Decode(&req.Measures); err != nil {
|
||||
return nil, fmt.Errorf("cannot unmarshal measure: %w", err)
|
||||
}
|
||||
|
||||
mesures, err := svc.Mesures.Import(ctx, input.OrganizationID, req)
|
||||
measures, err := svc.Measures.Import(ctx, input.OrganizationID, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot import mesure: %w", err)
|
||||
return nil, fmt.Errorf("cannot import measure: %w", err)
|
||||
}
|
||||
|
||||
mesureEdges := make([]*types.MesureEdge, len(mesures.Data))
|
||||
for i, mesure := range mesures.Data {
|
||||
mesureEdges[i] = types.NewMesureEdge(mesure, coredata.MesureOrderFieldCreatedAt)
|
||||
measureEdges := make([]*types.MeasureEdge, len(measures.Data))
|
||||
for i, measure := range measures.Data {
|
||||
measureEdges[i] = types.NewMeasureEdge(measure, coredata.MeasureOrderFieldCreatedAt)
|
||||
}
|
||||
|
||||
return &types.ImportMesurePayload{
|
||||
MesureEdges: mesureEdges,
|
||||
return &types.ImportMeasurePayload{
|
||||
MeasureEdges: measureEdges,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DeleteMesure is the resolver for the deleteMesure field.
|
||||
func (r *mutationResolver) DeleteMesure(ctx context.Context, input types.DeleteMesureInput) (*types.DeleteMesurePayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MesureID.TenantID())
|
||||
// DeleteMeasure is the resolver for the deleteMeasure field.
|
||||
func (r *mutationResolver) DeleteMeasure(ctx context.Context, input types.DeleteMeasureInput) (*types.DeleteMeasurePayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MeasureID.TenantID())
|
||||
|
||||
err := svc.Mesures.Delete(ctx, input.MesureID)
|
||||
err := svc.Measures.Delete(ctx, input.MeasureID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot delete mesure: %w", err))
|
||||
panic(fmt.Errorf("cannot delete measure: %w", err))
|
||||
}
|
||||
|
||||
return &types.DeleteMesurePayload{
|
||||
DeletedMesureID: input.MesureID,
|
||||
return &types.DeleteMeasurePayload{
|
||||
DeletedMeasureID: input.MeasureID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// CreateControlMesureMapping is the resolver for the createControlMesureMapping field.
|
||||
func (r *mutationResolver) CreateControlMesureMapping(ctx context.Context, input types.CreateControlMesureMappingInput) (*types.CreateControlMesureMappingPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MesureID.TenantID())
|
||||
// CreateControlMeasureMapping is the resolver for the createControlMeasureMapping field.
|
||||
func (r *mutationResolver) CreateControlMeasureMapping(ctx context.Context, input types.CreateControlMeasureMappingInput) (*types.CreateControlMeasureMappingPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MeasureID.TenantID())
|
||||
|
||||
err := svc.Controls.CreateMesureMapping(ctx, input.ControlID, input.MesureID)
|
||||
err := svc.Controls.CreateMeasureMapping(ctx, input.ControlID, input.MeasureID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot create control mesure mapping: %w", err))
|
||||
panic(fmt.Errorf("cannot create control measure mapping: %w", err))
|
||||
}
|
||||
|
||||
return &types.CreateControlMesureMappingPayload{
|
||||
return &types.CreateControlMeasureMappingPayload{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
@@ -635,16 +635,16 @@ func (r *mutationResolver) CreateControlPolicyMapping(ctx context.Context, input
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DeleteControlMesureMapping is the resolver for the deleteControlMesureMapping field.
|
||||
func (r *mutationResolver) DeleteControlMesureMapping(ctx context.Context, input types.DeleteControlMesureMappingInput) (*types.DeleteControlMesureMappingPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MesureID.TenantID())
|
||||
// DeleteControlMeasureMapping is the resolver for the deleteControlMeasureMapping field.
|
||||
func (r *mutationResolver) DeleteControlMeasureMapping(ctx context.Context, input types.DeleteControlMeasureMappingInput) (*types.DeleteControlMeasureMappingPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MeasureID.TenantID())
|
||||
|
||||
err := svc.Controls.DeleteMesureMapping(ctx, input.ControlID, input.MesureID)
|
||||
err := svc.Controls.DeleteMeasureMapping(ctx, input.ControlID, input.MeasureID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot delete control mesure mapping: %w", err))
|
||||
panic(fmt.Errorf("cannot delete control measure mapping: %w", err))
|
||||
}
|
||||
|
||||
return &types.DeleteControlMesureMappingPayload{
|
||||
return &types.DeleteControlMeasureMappingPayload{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
@@ -665,10 +665,10 @@ func (r *mutationResolver) DeleteControlPolicyMapping(ctx context.Context, input
|
||||
|
||||
// CreateTask is the resolver for the createTask field.
|
||||
func (r *mutationResolver) CreateTask(ctx context.Context, input types.CreateTaskInput) (*types.CreateTaskPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MesureID.TenantID())
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.MeasureID.TenantID())
|
||||
|
||||
task, err := svc.Tasks.Create(ctx, probo.CreateTaskRequest{
|
||||
MesureID: input.MesureID,
|
||||
MeasureID: input.MeasureID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
TimeEstimate: input.TimeEstimate,
|
||||
@@ -816,30 +816,30 @@ func (r *mutationResolver) DeleteRisk(ctx context.Context, input types.DeleteRis
|
||||
}, nil
|
||||
}
|
||||
|
||||
// CreateRiskMesureMapping is the resolver for the createRiskMesureMapping field.
|
||||
func (r *mutationResolver) CreateRiskMesureMapping(ctx context.Context, input types.CreateRiskMesureMappingInput) (*types.CreateRiskMesureMappingPayload, error) {
|
||||
// CreateRiskMeasureMapping is the resolver for the createRiskMeasureMapping field.
|
||||
func (r *mutationResolver) CreateRiskMeasureMapping(ctx context.Context, input types.CreateRiskMeasureMappingInput) (*types.CreateRiskMeasureMappingPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.RiskID.TenantID())
|
||||
|
||||
err := svc.Risks.CreateMesureMapping(ctx, input.RiskID, input.MesureID)
|
||||
err := svc.Risks.CreateMeasureMapping(ctx, input.RiskID, input.MeasureID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot create risk mesure mapping: %w", err))
|
||||
panic(fmt.Errorf("cannot create risk measure mapping: %w", err))
|
||||
}
|
||||
|
||||
return &types.CreateRiskMesureMappingPayload{
|
||||
return &types.CreateRiskMeasureMappingPayload{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DeleteRiskMesureMapping is the resolver for the deleteRiskMesureMapping field.
|
||||
func (r *mutationResolver) DeleteRiskMesureMapping(ctx context.Context, input types.DeleteRiskMesureMappingInput) (*types.DeleteRiskMesureMappingPayload, error) {
|
||||
// DeleteRiskMeasureMapping is the resolver for the deleteRiskMeasureMapping field.
|
||||
func (r *mutationResolver) DeleteRiskMeasureMapping(ctx context.Context, input types.DeleteRiskMeasureMappingInput) (*types.DeleteRiskMeasureMappingPayload, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, input.RiskID.TenantID())
|
||||
|
||||
err := svc.Risks.DeleteMesureMapping(ctx, input.RiskID, input.MesureID)
|
||||
err := svc.Risks.DeleteMeasureMapping(ctx, input.RiskID, input.MeasureID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot delete risk mesure mapping: %w", err))
|
||||
panic(fmt.Errorf("cannot delete risk measure mapping: %w", err))
|
||||
}
|
||||
|
||||
return &types.DeleteRiskMesureMappingPayload{
|
||||
return &types.DeleteRiskMeasureMappingPayload{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
@@ -1327,16 +1327,16 @@ func (r *organizationResolver) Policies(ctx context.Context, obj *types.Organiza
|
||||
return types.NewPolicyConnection(page), nil
|
||||
}
|
||||
|
||||
// Mesures is the resolver for the mesures field.
|
||||
func (r *organizationResolver) Mesures(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MesureOrderBy) (*types.MesureConnection, error) {
|
||||
// Measures is the resolver for the measures field.
|
||||
func (r *organizationResolver) Measures(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MeasureOrderBy) (*types.MeasureConnection, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.MesureOrderField]{
|
||||
Field: coredata.MesureOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: coredata.MeasureOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.MesureOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -1344,12 +1344,12 @@ func (r *organizationResolver) Mesures(ctx context.Context, obj *types.Organizat
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := svc.Mesures.ListForOrganizationID(ctx, obj.ID, cursor)
|
||||
page, err := svc.Measures.ListForOrganizationID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot list organization mesures: %w", err))
|
||||
panic(fmt.Errorf("cannot list organization measures: %w", err))
|
||||
}
|
||||
|
||||
return types.NewMesureConnection(page), nil
|
||||
return types.NewMeasureConnection(page), nil
|
||||
}
|
||||
|
||||
// Risks is the resolver for the risks field.
|
||||
@@ -1592,13 +1592,13 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
}
|
||||
|
||||
return types.NewFramework(framework), nil
|
||||
case coredata.MesureEntityType:
|
||||
mesure, err := svc.Mesures.Get(ctx, id)
|
||||
case coredata.MeasureEntityType:
|
||||
measure, err := svc.Measures.Get(ctx, id)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot get mesure: %w", err))
|
||||
panic(fmt.Errorf("cannot get measure: %w", err))
|
||||
}
|
||||
|
||||
return types.NewMesure(mesure), nil
|
||||
return types.NewMeasure(measure), nil
|
||||
case coredata.TaskEntityType:
|
||||
task, err := svc.Tasks.Get(ctx, id)
|
||||
if err != nil {
|
||||
@@ -1688,16 +1688,16 @@ func (r *riskResolver) Owner(ctx context.Context, obj *types.Risk) (*types.Peopl
|
||||
return types.NewPeople(owner), nil
|
||||
}
|
||||
|
||||
// Mesures is the resolver for the mesures field.
|
||||
func (r *riskResolver) Mesures(ctx context.Context, obj *types.Risk, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MesureOrderBy) (*types.MesureConnection, error) {
|
||||
// Measures is the resolver for the measures field.
|
||||
func (r *riskResolver) Measures(ctx context.Context, obj *types.Risk, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MeasureOrderBy) (*types.MeasureConnection, error) {
|
||||
svc := GetTenantService(ctx, r.proboSvc, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.MesureOrderField]{
|
||||
Field: coredata.MesureOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: coredata.MeasureOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.MesureOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.MeasureOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -1705,12 +1705,12 @@ func (r *riskResolver) Mesures(ctx context.Context, obj *types.Risk, first *int,
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := svc.Mesures.ListForRiskID(ctx, obj.ID, cursor)
|
||||
page, err := svc.Measures.ListForRiskID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot list risk mesures: %w", err))
|
||||
panic(fmt.Errorf("cannot list risk measures: %w", err))
|
||||
}
|
||||
|
||||
return types.NewMesureConnection(page), nil
|
||||
return types.NewMeasureConnection(page), nil
|
||||
}
|
||||
|
||||
// Policies is the resolver for the policies field.
|
||||
@@ -1999,8 +1999,8 @@ func (r *Resolver) Evidence() schema.EvidenceResolver { return &evidenceResolver
|
||||
// Framework returns schema.FrameworkResolver implementation.
|
||||
func (r *Resolver) Framework() schema.FrameworkResolver { return &frameworkResolver{r} }
|
||||
|
||||
// Mesure returns schema.MesureResolver implementation.
|
||||
func (r *Resolver) Mesure() schema.MesureResolver { return &mesureResolver{r} }
|
||||
// Measure returns schema.MeasureResolver implementation.
|
||||
func (r *Resolver) Measure() schema.MeasureResolver { return &measureResolver{r} }
|
||||
|
||||
// Mutation returns schema.MutationResolver implementation.
|
||||
func (r *Resolver) Mutation() schema.MutationResolver { return &mutationResolver{r} }
|
||||
@@ -2050,7 +2050,7 @@ func (r *Resolver) Viewer() schema.ViewerResolver { return &viewerResolver{r} }
|
||||
type controlResolver struct{ *Resolver }
|
||||
type evidenceResolver struct{ *Resolver }
|
||||
type frameworkResolver struct{ *Resolver }
|
||||
type mesureResolver struct{ *Resolver }
|
||||
type measureResolver struct{ *Resolver }
|
||||
type mutationResolver struct{ *Resolver }
|
||||
type organizationResolver struct{ *Resolver }
|
||||
type policyResolver struct{ *Resolver }
|
||||
|
||||
Reference in New Issue
Block a user