diff --git a/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx b/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx
new file mode 100644
index 000000000..bd7541fdc
--- /dev/null
+++ b/client/src/components/shop-csi-config-form/shop-csi-config-form.component.jsx
@@ -0,0 +1,26 @@
+import React from "react";
+import { Form } from "antd";
+import ConfigFormComponents from "../config-form-components/config-form-components.component";
+
+export default function ShopCsiConfigForm({ selectedCsi }) {
+ console.log("ShopCsiConfigForm -> selectedCsi", selectedCsi);
+ const readOnly = !!selectedCsi;
+ const [form] = Form.useForm();
+ const handleFinish = (values) => {
+ console.log("values :>> ", values);
+ };
+
+ return (
+
+ The Config Form {readOnly}
+ {selectedCsi && (
+
+ )}
+
+ );
+}
diff --git a/client/src/components/shop-csi-config/shop-csi-config.component.jsx b/client/src/components/shop-csi-config/shop-csi-config.component.jsx
new file mode 100644
index 000000000..2472ff85c
--- /dev/null
+++ b/client/src/components/shop-csi-config/shop-csi-config.component.jsx
@@ -0,0 +1,48 @@
+import { CheckCircleFilled } from "@ant-design/icons";
+import { Button, Col, List, Row } from "antd";
+import React, { useState } from "react";
+import { useQuery } from "react-apollo";
+import { useTranslation } from "react-i18next";
+import { GET_ALL_QUESTION_SETS } from "../../graphql/csi.queries";
+import { DateFormatter } from "../../utils/DateFormatter";
+import AlertComponent from "../alert/alert.component";
+import LoadingSpinner from "../loading-spinner/loading-spinner.component";
+import ShopCsiConfigForm from "../shop-csi-config-form/shop-csi-config-form.component";
+
+export default function ShopCsiConfig() {
+ const { loading, error, data } = useQuery(GET_ALL_QUESTION_SETS);
+ const [selectedCsi, setselectedCsi] = useState(null);
+ const { t } = useTranslation();
+
+ if (loading) return ;
+ if (error) return ;
+ return (
+
+ The Config Form
+
+
+ (
+
+ {item.created_at}
+ {item.csis_aggregate.aggregate.count}
+
+ {item.current ? (
+
+ ) : (
+
+ )}
+
+ )}
+ />
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/graphql/csi.queries.js b/client/src/graphql/csi.queries.js
index e6f838e10..b3c72ee9d 100644
--- a/client/src/graphql/csi.queries.js
+++ b/client/src/graphql/csi.queries.js
@@ -22,6 +22,22 @@ export const COMPLETE_SURVEY = gql`
}
`;
+export const GET_ALL_QUESTION_SETS = gql`
+ query GET_ALL_QUESTION_SETS {
+ csiquestions(order_by: { created_at: desc }) {
+ id
+ created_at
+ config
+ current
+ csis_aggregate {
+ aggregate {
+ count
+ }
+ }
+ }
+ }
+`;
+
export const GET_CURRENT_QUESTIONSET_ID = gql`
query GET_CURRENT_QUESTIONSET_ID {
csiquestions(where: { current: { _eq: true } }) {
diff --git a/client/src/pages/shop/shop.page.component.jsx b/client/src/pages/shop/shop.page.component.jsx
index da3af6779..76a564a3b 100644
--- a/client/src/pages/shop/shop.page.component.jsx
+++ b/client/src/pages/shop/shop.page.component.jsx
@@ -3,6 +3,7 @@ import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import ShopEmployeesContainer from "../../components/shop-employees/shop-employees.container";
import ShopInfoContainer from "../../components/shop-info/shop-info.container";
+import ShopCsiConfig from "../../components/shop-csi-config/shop-csi-config.component";
export default function ShopPage() {
const { t } = useTranslation();
@@ -12,15 +13,18 @@ export default function ShopPage() {
return (
-
+
-
+
-
+
Licensing
+
+
+
);
}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 81a2257bc..1cff3bab3 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -262,10 +262,13 @@
"accountingtiers": "Number of Tiers to Use for Export",
"alljobstatuses": "All Job Statuses",
"allopenjobstatuses": "All Open Job Statuses",
+ "csiq": "CSI Questions",
"customtemplates": "Custom Templates",
+ "employees": "Employees",
"intake": "Job Intake",
"jobstatuses": "Job Statuses",
"laborrates": "Labor Rates",
+ "licensing": "Licensing",
"notemplatesavailable": "No templates available to add.",
"orderstatuses": "Order Statuses",
"rbac": "Role Based Access Control",
@@ -424,6 +427,9 @@
}
},
"csi": {
+ "actions": {
+ "activate": "Activate"
+ },
"errors": {
"creating": "Error creating survey {{message}}",
"notconfigured": "You do not have any current CSI Question Sets configured.",
@@ -530,7 +536,8 @@
"save": "Save",
"saveandnew": "Save and New",
"submit": "Submit",
- "submitticket": "Submit a Support Ticket"
+ "submitticket": "Submit a Support Ticket",
+ "view": "View"
},
"itemtypes": {
"contract": "CC Contract",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 4813d42ed..fa1ecac7e 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -262,10 +262,13 @@
"accountingtiers": "",
"alljobstatuses": "",
"allopenjobstatuses": "",
+ "csiq": "",
"customtemplates": "",
+ "employees": "",
"intake": "",
"jobstatuses": "",
"laborrates": "",
+ "licensing": "",
"notemplatesavailable": "",
"orderstatuses": "",
"rbac": "",
@@ -424,6 +427,9 @@
}
},
"csi": {
+ "actions": {
+ "activate": ""
+ },
"errors": {
"creating": "",
"notconfigured": "",
@@ -530,7 +536,8 @@
"save": "Salvar",
"saveandnew": "",
"submit": "",
- "submitticket": ""
+ "submitticket": "",
+ "view": ""
},
"itemtypes": {
"contract": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 8bf2c9c38..2c789f8bc 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -262,10 +262,13 @@
"accountingtiers": "",
"alljobstatuses": "",
"allopenjobstatuses": "",
+ "csiq": "",
"customtemplates": "",
+ "employees": "",
"intake": "",
"jobstatuses": "",
"laborrates": "",
+ "licensing": "",
"notemplatesavailable": "",
"orderstatuses": "",
"rbac": "",
@@ -424,6 +427,9 @@
}
},
"csi": {
+ "actions": {
+ "activate": ""
+ },
"errors": {
"creating": "",
"notconfigured": "",
@@ -530,7 +536,8 @@
"save": "sauvegarder",
"saveandnew": "",
"submit": "",
- "submitticket": ""
+ "submitticket": "",
+ "view": ""
},
"itemtypes": {
"contract": "",