Compare commits

..

1 Commits

Author SHA1 Message Date
Allan Carr
3fe0e3a33c IO-3222 Vendor Name Open Search
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2025-04-25 09:39:20 -07:00
6 changed files with 25 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
import React from "react";
import { Card, Form, Select } from "antd";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
import PropTypes from "prop-types";
const FilterSettings = ({
selectedMdInsCos,

View File

@@ -1,9 +1,10 @@
import { Card, Checkbox, Col, Form, Row } from "antd";
import React from "react";
import PropTypes from "prop-types";
const InformationSettings = ({ t }) => (
<Card title={t("production.settings.information")} style={{ maxWidth: "100%", overflowX: "auto" }}>
<Row gutter={[16, 16]} wrap>
<Card title={t("production.settings.information")}>
<Row gutter={[16, 16]}>
{[
"model_info",
"ownr_nm",
@@ -20,7 +21,7 @@ const InformationSettings = ({ t }) => (
"subtotal",
"tasks"
].map((item) => (
<Col xs={24} sm={12} md={8} lg={6} key={item}>
<Col span={4} key={item}>
<Form.Item name={item} valuePropName="checked">
<Checkbox>{t(`production.labels.${item}`)}</Checkbox>
</Form.Item>

View File

@@ -1,8 +1,9 @@
import { Card, Col, Form, Radio, Row } from "antd";
import React from "react";
import PropTypes from "prop-types";
const LayoutSettings = ({ t }) => (
<Card title={t("production.settings.layout")} style={{ maxWidth: "100%", overflowX: "auto" }}>
<Card title={t("production.settings.layout")}>
<Row gutter={[16, 16]}>
{[
{
@@ -47,9 +48,9 @@ const LayoutSettings = ({ t }) => (
]
}
].map(({ name, label, options }) => (
<Col xs={24} sm={16} md={10} lg={8} key={name}>
<Col span={4} key={name}>
<Form.Item name={name} label={label}>
<Radio.Group style={{ display: "flex", flexWrap: "nowrap" }}>
<Radio.Group>
{options.map((option) => (
<Radio.Button key={option.value.toString()} value={option.value}>
{option.label}

View File

@@ -1,7 +1,8 @@
import { Card, Checkbox, Form } from "antd";
import PropTypes from "prop-types";
import { DragDropContext, Draggable, Droppable } from "../trello-board/dnd/lib/index.js";
import { statisticsItems } from "./defaultKanbanSettings.js";
import { Card, Checkbox, Form } from "antd";
import React from "react";
import PropTypes from "prop-types";
const StatisticsSettings = ({ t, statisticsOrder, setStatisticsOrder, setHasChanges }) => {
const onDragEnd = (result) => {

View File

@@ -1,17 +1,17 @@
import { SettingOutlined } from "@ant-design/icons";
import { useMutation } from "@apollo/client";
import { Button, Card, Col, Form, Popover, Row, Tabs } from "antd";
import { isFunction } from "lodash";
import PropTypes from "prop-types";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { useNotification } from "../../../contexts/Notifications/notificationContext.jsx";
import { UPDATE_KANBAN_SETTINGS } from "../../../graphql/user.queries.js";
import { defaultKanbanSettings, mergeWithDefaults } from "./defaultKanbanSettings.js";
import FilterSettings from "./FilterSettings.jsx";
import InformationSettings from "./InformationSettings.jsx";
import LayoutSettings from "./LayoutSettings.jsx";
import InformationSettings from "./InformationSettings.jsx";
import StatisticsSettings from "./StatisticsSettings.jsx";
import FilterSettings from "./FilterSettings.jsx";
import PropTypes from "prop-types";
import { isFunction } from "lodash";
import { useNotification } from "../../../contexts/Notifications/notificationContext.jsx";
import { SettingOutlined } from "@ant-design/icons";
function ProductionBoardKanbanSettings({ associationSettings, parentLoading, bodyshop, data, onSettingsChange }) {
const [form] = Form.useForm();
@@ -87,7 +87,7 @@ function ProductionBoardKanbanSettings({ associationSettings, parentLoading, bod
};
const overlay = (
<Card style={{ maxWidth: "80vw", width: "100%"}}>
<Card style={{ minWidth: "80vw" }}>
<Form form={form} onFinish={handleFinish} layout="vertical" onValuesChange={handleValuesChange}>
<Tabs
defaultActiveKey="1"

View File

@@ -64,7 +64,7 @@ async function OpenSearchUpdateHandler(req, res) {
document = pick(req.body.event.data.new, ["id", "ownr_fn", "ownr_ln", "ownr_co_nm", "ownr_ph1", "ownr_ph2"]);
document.bodyshopid = req.body.event.data.new.shopid;
break;
case "bills":
case "bills": {
const bill = await client.request(
`query ADMIN_GET_BILL_BY_ID($billId: uuid!) {
bills_by_pk(id: $billId) {
@@ -97,7 +97,8 @@ async function OpenSearchUpdateHandler(req, res) {
bodyshopid: bill.bills_by_pk.job.shopid
};
break;
case "payments":
}
case "payments": {
//Query to get the job and RO number
const payment = await client.request(
@@ -141,6 +142,7 @@ async function OpenSearchUpdateHandler(req, res) {
bodyshopid: payment.payments_by_pk.job.shopid
};
break;
}
}
const payload = {
id: req.body.event.data.new.id,
@@ -255,6 +257,7 @@ async function OpenSearchSearchHandler(req, res) {
"*ownr_co_nm^8",
"*ownr_ph1^8",
"*ownr_ph2^8",
"*vendor.name^8",
"*comment^6"
// "*"
]