Rename Create->New & Update->Edit
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -15,13 +15,13 @@ import { EditMitigationPage } from "./mitigations/EditMitigationPage";
|
||||
import { MitigationListPage } from "./mitigations/MitigationListPage";
|
||||
import { MitigationPage } from "./mitigations/MitigationPage";
|
||||
import { NewMitigationPage } from "./mitigations/NewMitigationPage";
|
||||
import { CreatePeoplePage } from "./people/CreatePeoplePage";
|
||||
import { NewPeoplePage } from "./people/NewPeoplePage";
|
||||
import { PeopleListPage } from "./people/PeopleListPage";
|
||||
import { PeoplePage } from "./people/PeoplePage";
|
||||
import { CreatePolicyPage } from "./policies/CreatePolicyPage";
|
||||
import { EditPolicyPage } from "./policies/EditPolicyPage";
|
||||
import { NewPolicyPage } from "./policies/NewPolicyPage";
|
||||
import { PolicyListPage } from "./policies/PolicyListPage";
|
||||
import { PolicyPage } from "./policies/PolicyPage";
|
||||
import { UpdatePolicyPage } from "./policies/UpdatePolicyPage";
|
||||
import { NewRiskPage } from "./risks/NewRiskPage";
|
||||
import { RiskListPage } from "./risks/RiskListPage";
|
||||
import ShowRiskView from "./risks/ShowRiskView";
|
||||
@@ -34,7 +34,7 @@ export function OrganizationsRoutes() {
|
||||
<Route path=":organizationId/*" element={<OrganizationLayout />}>
|
||||
<Route index element={<HomePage />} />
|
||||
<Route path="people" element={<PeopleListPage />} />
|
||||
<Route path="people/new" element={<CreatePeoplePage />} />
|
||||
<Route path="people/new" element={<NewPeoplePage />} />
|
||||
<Route path="people/:peopleId" element={<PeoplePage />} />
|
||||
<Route path="vendors" element={<VendorListPage />} />
|
||||
<Route path="frameworks" element={<FrameworkListPage />} />
|
||||
@@ -56,9 +56,9 @@ export function OrganizationsRoutes() {
|
||||
/>
|
||||
<Route path="vendors/:vendorId" element={<VendorPage />} />
|
||||
<Route path="policies" element={<PolicyListPage />} />
|
||||
<Route path="policies/new" element={<CreatePolicyPage />} />
|
||||
<Route path="policies/new" element={<NewPolicyPage />} />
|
||||
<Route path="policies/:policyId" element={<PolicyPage />} />
|
||||
<Route path="policies/:policyId/edit" element={<UpdatePolicyPage />} />
|
||||
<Route path="policies/:policyId/edit" element={<EditPolicyPage />} />
|
||||
<Route path="risks" element={<RiskListPage />} />
|
||||
<Route path="risks/new" element={<NewRiskPage />} />
|
||||
<Route path="risks/:riskId" element={<ShowRiskView />} />
|
||||
|
||||
@@ -4,12 +4,12 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const CreatePeopleView = lazy(() => import("./CreatePeopleView"));
|
||||
const NewPeopleView = lazy(() => import("./NewPeopleView"));
|
||||
|
||||
export function CreatePeopleViewSkeleton() {
|
||||
export function NewPeopleViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Create Person"
|
||||
title="New Person"
|
||||
description="Add a new person interacting with organization"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-muted rounded-xl animate-pulse" />
|
||||
@@ -17,13 +17,13 @@ export function CreatePeopleViewSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export function CreatePeoplePage() {
|
||||
export function NewPeoplePage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<CreatePeopleViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<NewPeopleViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreatePeopleView />
|
||||
<NewPeopleView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -8,12 +8,12 @@ import { Label } from "@/components/ui/label";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { HelpCircle } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { CreatePeopleViewCreatePeopleMutation } from "./__generated__/CreatePeopleViewCreatePeopleMutation.graphql";
|
||||
import { NewPeopleViewCreatePeopleMutation } from "./__generated__/NewPeopleViewCreatePeopleMutation.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { CreatePeopleViewSkeleton } from "./CreatePeoplePage";
|
||||
import { NewPeopleViewSkeleton } from "./NewPeoplePage";
|
||||
|
||||
const createPeopleMutation = graphql`
|
||||
mutation CreatePeopleViewCreatePeopleMutation(
|
||||
mutation NewPeopleViewCreatePeopleMutation(
|
||||
$input: CreatePeopleInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -65,12 +65,12 @@ function EditableField({
|
||||
);
|
||||
}
|
||||
|
||||
function CreatePeopleViewContent() {
|
||||
function NewPeopleViewContent() {
|
||||
const navigate = useNavigate();
|
||||
const { organizationId } = useParams();
|
||||
|
||||
const [createPeople] =
|
||||
useMutation<CreatePeopleViewCreatePeopleMutation>(createPeopleMutation);
|
||||
useMutation<NewPeopleViewCreatePeopleMutation>(createPeopleMutation);
|
||||
const { toast } = useToast();
|
||||
const [formData, setFormData] = useState({
|
||||
fullName: "",
|
||||
@@ -296,10 +296,10 @@ function CreatePeopleViewContent() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function CreatePeopleView() {
|
||||
export default function NewPeopleView() {
|
||||
return (
|
||||
<Suspense fallback={<CreatePeopleViewSkeleton />}>
|
||||
<CreatePeopleViewContent />
|
||||
<Suspense fallback={<NewPeopleViewSkeleton />}>
|
||||
<NewPeopleViewContent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<eb07431152c49241a6e636984bbd5bee>>
|
||||
* @generated SignedSource<<76fb19bfca9165a9c40d0b306e53c1de>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -17,11 +17,11 @@ export type CreatePeopleInput = {
|
||||
organizationId: string;
|
||||
primaryEmailAddress: string;
|
||||
};
|
||||
export type CreatePeopleViewCreatePeopleMutation$variables = {
|
||||
export type NewPeopleViewCreatePeopleMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreatePeopleInput;
|
||||
};
|
||||
export type CreatePeopleViewCreatePeopleMutation$data = {
|
||||
export type NewPeopleViewCreatePeopleMutation$data = {
|
||||
readonly createPeople: {
|
||||
readonly peopleEdge: {
|
||||
readonly node: {
|
||||
@@ -34,9 +34,9 @@ export type CreatePeopleViewCreatePeopleMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type CreatePeopleViewCreatePeopleMutation = {
|
||||
response: CreatePeopleViewCreatePeopleMutation$data;
|
||||
variables: CreatePeopleViewCreatePeopleMutation$variables;
|
||||
export type NewPeopleViewCreatePeopleMutation = {
|
||||
response: NewPeopleViewCreatePeopleMutation$data;
|
||||
variables: NewPeopleViewCreatePeopleMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -122,7 +122,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreatePeopleViewCreatePeopleMutation",
|
||||
"name": "NewPeopleViewCreatePeopleMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -147,7 +147,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "CreatePeopleViewCreatePeopleMutation",
|
||||
"name": "NewPeopleViewCreatePeopleMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -180,16 +180,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f09d8f7be5234f21e7bfabecf8d8b0af",
|
||||
"cacheID": "d9cfab5066a89013eef581dc016daf57",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreatePeopleViewCreatePeopleMutation",
|
||||
"name": "NewPeopleViewCreatePeopleMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation CreatePeopleViewCreatePeopleMutation(\n $input: CreatePeopleInput!\n) {\n createPeople(input: $input) {\n peopleEdge {\n node {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n }\n }\n }\n}\n"
|
||||
"text": "mutation NewPeopleViewCreatePeopleMutation(\n $input: CreatePeopleInput!\n) {\n createPeople(input: $input) {\n peopleEdge {\n node {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ac8a85af6d2902de6f475588679ba038";
|
||||
(node as any).hash = "fd4b7a5907702712c654005de2a98996";
|
||||
|
||||
export default node;
|
||||
@@ -4,26 +4,26 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const UpdatePolicyView = lazy(() => import("./UpdatePolicyView"));
|
||||
const EditPolicyView = lazy(() => import("./EditPolicyView"));
|
||||
|
||||
export function UpdatePolicyViewSkeleton() {
|
||||
export function EditPolicyViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Update Policy"
|
||||
description="Update an existing policy"
|
||||
title="Edit Policy"
|
||||
description="Edit an existing policy"
|
||||
>
|
||||
<div className="bg-muted animate-pulse rounded-lg h-[600px]" />
|
||||
</PageTemplateSkeleton>
|
||||
);
|
||||
}
|
||||
|
||||
export function UpdatePolicyPage() {
|
||||
export function EditPolicyPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<UpdatePolicyViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<EditPolicyViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdatePolicyView />
|
||||
<EditPolicyView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -17,13 +17,13 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
||||
import { Suspense } from "react";
|
||||
import PolicyEditor from "@/components/PolicyEditor";
|
||||
import PeopleSelector from "@/components/PeopleSelector";
|
||||
import type { UpdatePolicyViewQuery as UpdatePolicyViewQueryType } from "./__generated__/UpdatePolicyViewQuery.graphql";
|
||||
import type { UpdatePolicyViewMutation as UpdatePolicyViewMutationType } from "./__generated__/UpdatePolicyViewMutation.graphql";
|
||||
import type { EditPolicyViewQuery } from "./__generated__/EditPolicyViewQuery.graphql";
|
||||
import type { EditPolicyViewMutation as EditPolicyViewMutationType } from "./__generated__/EditPolicyViewMutation.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { UpdatePolicyViewSkeleton } from "./UpdatePolicyPage";
|
||||
import { EditPolicyViewSkeleton } from "./EditPolicyPage";
|
||||
|
||||
const UpdatePolicyViewQuery = graphql`
|
||||
query UpdatePolicyViewQuery($policyId: ID!, $organizationId: ID!) {
|
||||
const editPolicyViewQuery = graphql`
|
||||
query EditPolicyViewQuery($policyId: ID!, $organizationId: ID!) {
|
||||
policy: node(id: $policyId) {
|
||||
id
|
||||
... on Policy {
|
||||
@@ -44,7 +44,7 @@ const UpdatePolicyViewQuery = graphql`
|
||||
`;
|
||||
|
||||
const UpdatePolicyMutation = graphql`
|
||||
mutation UpdatePolicyViewMutation($input: UpdatePolicyInput!) {
|
||||
mutation EditPolicyViewMutation($input: UpdatePolicyInput!) {
|
||||
updatePolicy(input: $input) {
|
||||
policy {
|
||||
id
|
||||
@@ -61,19 +61,19 @@ const UpdatePolicyMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
function UpdatePolicyViewContent({
|
||||
function EditPolicyViewContent({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<UpdatePolicyViewQueryType>;
|
||||
queryRef: PreloadedQuery<EditPolicyViewQuery>;
|
||||
}) {
|
||||
const navigate = useNavigate();
|
||||
const { organizationId, policyId } = useParams();
|
||||
const data = usePreloadedQuery<UpdatePolicyViewQueryType>(
|
||||
UpdatePolicyViewQuery,
|
||||
const data = usePreloadedQuery<EditPolicyViewQuery>(
|
||||
editPolicyViewQuery,
|
||||
queryRef
|
||||
);
|
||||
|
||||
console.log("UpdatePolicyView data:", data.policy);
|
||||
console.log("EditPolicyView data:", data.policy);
|
||||
|
||||
const [name, setName] = useState(data.policy.name);
|
||||
const [content, setContent] = useState(data.policy.content || "");
|
||||
@@ -85,14 +85,14 @@ function UpdatePolicyViewContent({
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
|
||||
console.log(
|
||||
"UpdatePolicyView state - content:",
|
||||
"EditPolicyView state - content:",
|
||||
content
|
||||
? content.substring(0, 50) + (content.length > 50 ? "..." : "")
|
||||
: "empty"
|
||||
);
|
||||
|
||||
const [commitMutation] =
|
||||
useMutation<UpdatePolicyViewMutationType>(UpdatePolicyMutation);
|
||||
useMutation<EditPolicyViewMutationType>(UpdatePolicyMutation);
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
@@ -249,11 +249,10 @@ function UpdatePolicyViewContent({
|
||||
);
|
||||
}
|
||||
|
||||
export default function UpdatePolicyView() {
|
||||
export default function EditPolicyView() {
|
||||
const { organizationId, policyId } = useParams();
|
||||
const [queryRef, loadQuery] = useQueryLoader<UpdatePolicyViewQueryType>(
|
||||
UpdatePolicyViewQuery
|
||||
);
|
||||
const [queryRef, loadQuery] =
|
||||
useQueryLoader<EditPolicyViewQuery>(editPolicyViewQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (organizationId && policyId) {
|
||||
@@ -262,12 +261,12 @@ export default function UpdatePolicyView() {
|
||||
}, [organizationId, policyId, loadQuery]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <UpdatePolicyViewSkeleton />;
|
||||
return <EditPolicyViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<UpdatePolicyViewSkeleton />}>
|
||||
{queryRef && <UpdatePolicyViewContent queryRef={queryRef} />}
|
||||
<Suspense fallback={<EditPolicyViewSkeleton />}>
|
||||
{queryRef && <EditPolicyViewContent queryRef={queryRef} />}
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -4,26 +4,26 @@ import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
|
||||
const CreatePolicyView = lazy(() => import("./CreatePolicyView"));
|
||||
const NewPolicyView = lazy(() => import("./NewPolicyView"));
|
||||
|
||||
export function CreatePolicyViewSkeleton() {
|
||||
export function NewPolicyViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Create Policy"
|
||||
description="Create a new policy for your organization"
|
||||
title="New Policy"
|
||||
description="Add a new policy for your organization"
|
||||
>
|
||||
<div className="bg-muted animate-pulse rounded-lg h-[600px]" />
|
||||
</PageTemplateSkeleton>
|
||||
);
|
||||
}
|
||||
|
||||
export function CreatePolicyPage() {
|
||||
export function NewPolicyPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<CreatePolicyViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<NewPolicyViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreatePolicyView />
|
||||
<NewPolicyView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -18,13 +18,13 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
||||
import PolicyEditor from "@/components/PolicyEditor";
|
||||
import PeopleSelector from "@/components/PeopleSelector";
|
||||
import { Suspense } from "react";
|
||||
import type { CreatePolicyViewMutation } from "./__generated__/CreatePolicyViewMutation.graphql";
|
||||
import type { CreatePolicyViewQuery as CreatePolicyViewQueryType } from "./__generated__/CreatePolicyViewQuery.graphql";
|
||||
import type { NewPolicyViewMutation } from "./__generated__/NewPolicyViewMutation.graphql";
|
||||
import type { NewPolicyViewQuery } from "./__generated__/NewPolicyViewQuery.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { CreatePolicyViewSkeleton } from "./CreatePolicyPage";
|
||||
import { NewPolicyViewSkeleton } from "./NewPolicyPage";
|
||||
|
||||
const CreatePolicyQuery = graphql`
|
||||
query CreatePolicyViewQuery($organizationId: ID!) {
|
||||
const newPolicyQuery = graphql`
|
||||
query NewPolicyViewQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
...PeopleSelector_organization
|
||||
}
|
||||
@@ -32,7 +32,7 @@ const CreatePolicyQuery = graphql`
|
||||
`;
|
||||
|
||||
const CreatePolicyMutation = graphql`
|
||||
mutation CreatePolicyViewMutation(
|
||||
mutation NewPolicyViewMutation(
|
||||
$input: CreatePolicyInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -57,14 +57,11 @@ const CreatePolicyMutation = graphql`
|
||||
function CreatePolicyForm({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<CreatePolicyViewQueryType>;
|
||||
queryRef: PreloadedQuery<NewPolicyViewQuery>;
|
||||
}) {
|
||||
const navigate = useNavigate();
|
||||
const { organizationId } = useParams();
|
||||
const data = usePreloadedQuery<CreatePolicyViewQueryType>(
|
||||
CreatePolicyQuery,
|
||||
queryRef
|
||||
);
|
||||
const data = usePreloadedQuery<NewPolicyViewQuery>(newPolicyQuery, queryRef);
|
||||
const [name, setName] = useState("");
|
||||
const [content, setContent] = useState("");
|
||||
const [status, setStatus] = useState<"DRAFT" | "ACTIVE">("DRAFT");
|
||||
@@ -74,14 +71,14 @@ function CreatePolicyForm({
|
||||
const { toast } = useToast();
|
||||
|
||||
console.log(
|
||||
"CreatePolicyView state - content:",
|
||||
"NewPolicyView state - content:",
|
||||
content
|
||||
? content.substring(0, 50) + (content.length > 50 ? "..." : "")
|
||||
: "empty"
|
||||
);
|
||||
|
||||
const [commitMutation] =
|
||||
useMutation<CreatePolicyViewMutation>(CreatePolicyMutation);
|
||||
useMutation<NewPolicyViewMutation>(CreatePolicyMutation);
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
@@ -261,10 +258,10 @@ function CreatePolicyForm({
|
||||
);
|
||||
}
|
||||
|
||||
export default function CreatePolicyView() {
|
||||
export default function NewPolicyView() {
|
||||
const { organizationId } = useParams();
|
||||
const [queryRef, loadQuery] =
|
||||
useQueryLoader<CreatePolicyViewQueryType>(CreatePolicyQuery);
|
||||
useQueryLoader<NewPolicyViewQuery>(newPolicyQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (organizationId) {
|
||||
@@ -273,11 +270,11 @@ export default function CreatePolicyView() {
|
||||
}, [organizationId, loadQuery]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <CreatePolicyViewSkeleton />;
|
||||
return <NewPolicyViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<CreatePolicyViewSkeleton />}>
|
||||
<Suspense fallback={<NewPolicyViewSkeleton />}>
|
||||
{<CreatePolicyForm queryRef={queryRef} />}
|
||||
</Suspense>
|
||||
);
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<efc33f8979f142c09b65b2bd1d6e06be>>
|
||||
* @generated SignedSource<<171200736f3a443faae3f8b7c2085f4f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -18,10 +18,10 @@ export type UpdatePolicyInput = {
|
||||
reviewDate?: string | null | undefined;
|
||||
status?: PolicyStatus | null | undefined;
|
||||
};
|
||||
export type UpdatePolicyViewMutation$variables = {
|
||||
export type EditPolicyViewMutation$variables = {
|
||||
input: UpdatePolicyInput;
|
||||
};
|
||||
export type UpdatePolicyViewMutation$data = {
|
||||
export type EditPolicyViewMutation$data = {
|
||||
readonly updatePolicy: {
|
||||
readonly policy: {
|
||||
readonly content: string;
|
||||
@@ -36,9 +36,9 @@ export type UpdatePolicyViewMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type UpdatePolicyViewMutation = {
|
||||
response: UpdatePolicyViewMutation$data;
|
||||
variables: UpdatePolicyViewMutation$variables;
|
||||
export type EditPolicyViewMutation = {
|
||||
response: EditPolicyViewMutation$data;
|
||||
variables: EditPolicyViewMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -139,7 +139,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "UpdatePolicyViewMutation",
|
||||
"name": "EditPolicyViewMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -148,20 +148,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "UpdatePolicyViewMutation",
|
||||
"name": "EditPolicyViewMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "aae664c7d961ad4e17c8e37464a34865",
|
||||
"cacheID": "643990a3ab54cb51144f434b023531e7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "UpdatePolicyViewMutation",
|
||||
"name": "EditPolicyViewMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation UpdatePolicyViewMutation(\n $input: UpdatePolicyInput!\n) {\n updatePolicy(input: $input) {\n policy {\n id\n name\n content\n status\n reviewDate\n owner {\n id\n fullName\n }\n }\n }\n}\n"
|
||||
"text": "mutation EditPolicyViewMutation(\n $input: UpdatePolicyInput!\n) {\n updatePolicy(input: $input) {\n policy {\n id\n name\n content\n status\n reviewDate\n owner {\n id\n fullName\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "d0f7b9d21b450416900ccb46439e2894";
|
||||
(node as any).hash = "41d4945568bc1f43eeedc727a968654d";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<e3772627b3bf7e5938d48808edd9fcb8>>
|
||||
* @generated SignedSource<<312876323f4072e43048dfe1b2e21d08>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -11,11 +11,11 @@
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type PolicyStatus = "ACTIVE" | "DRAFT";
|
||||
export type UpdatePolicyViewQuery$variables = {
|
||||
export type EditPolicyViewQuery$variables = {
|
||||
organizationId: string;
|
||||
policyId: string;
|
||||
};
|
||||
export type UpdatePolicyViewQuery$data = {
|
||||
export type EditPolicyViewQuery$data = {
|
||||
readonly organization: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"PeopleSelector_organization">;
|
||||
};
|
||||
@@ -31,9 +31,9 @@ export type UpdatePolicyViewQuery$data = {
|
||||
readonly status?: PolicyStatus;
|
||||
};
|
||||
};
|
||||
export type UpdatePolicyViewQuery = {
|
||||
response: UpdatePolicyViewQuery$data;
|
||||
variables: UpdatePolicyViewQuery$variables;
|
||||
export type EditPolicyViewQuery = {
|
||||
response: EditPolicyViewQuery$data;
|
||||
variables: EditPolicyViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -153,7 +153,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "UpdatePolicyViewQuery",
|
||||
"name": "EditPolicyViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "policy",
|
||||
@@ -195,7 +195,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "UpdatePolicyViewQuery",
|
||||
"name": "EditPolicyViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "policy",
|
||||
@@ -320,16 +320,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b7958bceabdd33c39fb403bdc6dbd85e",
|
||||
"cacheID": "4d52d22f9d8acc7912a57d974f558248",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "UpdatePolicyViewQuery",
|
||||
"name": "EditPolicyViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query UpdatePolicyViewQuery(\n $policyId: ID!\n $organizationId: ID!\n) {\n policy: node(id: $policyId) {\n __typename\n id\n ... on Policy {\n name\n content\n status\n reviewDate\n owner {\n id\n fullName\n }\n }\n }\n organization: node(id: $organizationId) {\n __typename\n ...PeopleSelector_organization\n id\n }\n}\n\nfragment PeopleSelector_organization on Organization {\n id\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"
|
||||
"text": "query EditPolicyViewQuery(\n $policyId: ID!\n $organizationId: ID!\n) {\n policy: node(id: $policyId) {\n __typename\n id\n ... on Policy {\n name\n content\n status\n reviewDate\n owner {\n id\n fullName\n }\n }\n }\n organization: node(id: $organizationId) {\n __typename\n ...PeopleSelector_organization\n id\n }\n}\n\nfragment PeopleSelector_organization on Organization {\n id\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "d29279c14662125a7fb14fa4da857f2b";
|
||||
(node as any).hash = "d16bdd881b27b1aa5368130ce036fd20";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<6100eacd24cc3b7e7fe5dc4539323e75>>
|
||||
* @generated SignedSource<<2026b385ee5eb895da6ca9c919762913>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -18,11 +18,11 @@ export type CreatePolicyInput = {
|
||||
reviewDate?: string | null | undefined;
|
||||
status: PolicyStatus;
|
||||
};
|
||||
export type CreatePolicyViewMutation$variables = {
|
||||
export type NewPolicyViewMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreatePolicyInput;
|
||||
};
|
||||
export type CreatePolicyViewMutation$data = {
|
||||
export type NewPolicyViewMutation$data = {
|
||||
readonly createPolicy: {
|
||||
readonly policyEdge: {
|
||||
readonly node: {
|
||||
@@ -39,9 +39,9 @@ export type CreatePolicyViewMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type CreatePolicyViewMutation = {
|
||||
response: CreatePolicyViewMutation$data;
|
||||
variables: CreatePolicyViewMutation$variables;
|
||||
export type NewPolicyViewMutation = {
|
||||
response: NewPolicyViewMutation$data;
|
||||
variables: NewPolicyViewMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -147,7 +147,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreatePolicyViewMutation",
|
||||
"name": "NewPolicyViewMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -172,7 +172,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "CreatePolicyViewMutation",
|
||||
"name": "NewPolicyViewMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -205,16 +205,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "732425c047d258a0c592d60073c4fcbd",
|
||||
"cacheID": "aa29cde3106d1c8d35c6ae8e74f310b7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreatePolicyViewMutation",
|
||||
"name": "NewPolicyViewMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation CreatePolicyViewMutation(\n $input: CreatePolicyInput!\n) {\n createPolicy(input: $input) {\n policyEdge {\n node {\n id\n name\n content\n status\n reviewDate\n owner {\n id\n fullName\n }\n }\n }\n }\n}\n"
|
||||
"text": "mutation NewPolicyViewMutation(\n $input: CreatePolicyInput!\n) {\n createPolicy(input: $input) {\n policyEdge {\n node {\n id\n name\n content\n status\n reviewDate\n owner {\n id\n fullName\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "af0c4091836cf3c833749da8495e378f";
|
||||
(node as any).hash = "f6dcabf6c51e3858c9750e00fcc0cc15";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0d6c35628ee18fe62e21ea579a02d118>>
|
||||
* @generated SignedSource<<84789bb949f94e924de1c9b9d566b4a5>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,17 +10,17 @@
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type CreatePolicyViewQuery$variables = {
|
||||
export type NewPolicyViewQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type CreatePolicyViewQuery$data = {
|
||||
export type NewPolicyViewQuery$data = {
|
||||
readonly organization: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"PeopleSelector_organization">;
|
||||
};
|
||||
};
|
||||
export type CreatePolicyViewQuery = {
|
||||
response: CreatePolicyViewQuery$data;
|
||||
variables: CreatePolicyViewQuery$variables;
|
||||
export type NewPolicyViewQuery = {
|
||||
response: NewPolicyViewQuery$data;
|
||||
variables: NewPolicyViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -72,7 +72,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreatePolicyViewQuery",
|
||||
"name": "NewPolicyViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -98,7 +98,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "CreatePolicyViewQuery",
|
||||
"name": "NewPolicyViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -215,16 +215,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "85c335b0eeb8dc59c5255083f3c3c7e8",
|
||||
"cacheID": "552067b4b0632972c14f7a8dcaf171aa",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreatePolicyViewQuery",
|
||||
"name": "NewPolicyViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query CreatePolicyViewQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ...PeopleSelector_organization\n id\n }\n}\n\nfragment PeopleSelector_organization on Organization {\n id\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"
|
||||
"text": "query NewPolicyViewQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ...PeopleSelector_organization\n id\n }\n}\n\nfragment PeopleSelector_organization on Organization {\n id\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "9184af33ef358fb3c201d41469d49cc8";
|
||||
(node as any).hash = "98fa41bfaf0d76adce1c91cf8d6ade28";
|
||||
|
||||
export default node;
|
||||
Reference in New Issue
Block a user