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