Resolve list arrow movement IO-604
This commit is contained in:
@@ -4,12 +4,13 @@ export default function FormListMoveArrows({ move, index, total }) {
|
|||||||
const upDisabled = index === 0;
|
const upDisabled = index === 0;
|
||||||
const downDisabled = index === total - 1;
|
const downDisabled = index === total - 1;
|
||||||
|
|
||||||
|
console.log(index);
|
||||||
const handleUp = () => {
|
const handleUp = () => {
|
||||||
move(index, index - 1);
|
move(index, index - 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDown = () => {
|
const handleDown = () => {
|
||||||
move(index, index - 1);
|
move(index, index + 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import { notification } from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { message, notification } from "antd";
|
import React, { useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function PartnerPingComponent() {
|
export default function PartnerPingComponent() {
|
||||||
@@ -12,6 +12,7 @@ export default function PartnerPingComponent() {
|
|||||||
try {
|
try {
|
||||||
const PartnerResponse = await axios.post("http://localhost:1337/ping/");
|
const PartnerResponse = await axios.post("http://localhost:1337/ping/");
|
||||||
const { appver, qbpath } = PartnerResponse.data;
|
const { appver, qbpath } = PartnerResponse.data;
|
||||||
|
console.log({ appver, qbpath });
|
||||||
if (!qbpath) {
|
if (!qbpath) {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
title: "",
|
title: "",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useLazyQuery } from "@apollo/react-hooks";
|
import { useLazyQuery } from "@apollo/react-hooks";
|
||||||
import { Button, DatePicker, Form, Input, Select, Switch } from "antd";
|
import { Button, DatePicker, Form, Select, Switch } from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -28,16 +28,13 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
|||||||
const Templates = TemplateList("report_center");
|
const Templates = TemplateList("report_center");
|
||||||
const { visible } = reportCenterModal;
|
const { visible } = reportCenterModal;
|
||||||
|
|
||||||
const [callVendorQuery, { loading, error, data, called }] = useLazyQuery(
|
const [callVendorQuery, { data, called }] = useLazyQuery(QUERY_ALL_VENDORS, {
|
||||||
QUERY_ALL_VENDORS,
|
skip: !(
|
||||||
{
|
visible &&
|
||||||
skip: !(
|
Templates[form.getFieldValue("key")] &&
|
||||||
visible &&
|
Templates[form.getFieldValue("key")].idtype
|
||||||
Templates[form.getFieldValue("key")] &&
|
),
|
||||||
Templates[form.getFieldValue("key")].idtype
|
});
|
||||||
),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleFinish = (values) => {
|
const handleFinish = (values) => {
|
||||||
const start = values.dates[0];
|
const start = values.dates[0];
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import axios from "axios";
|
|
||||||
import gql from "graphql-tag";
|
|
||||||
|
|
||||||
import { JsonEditor as Editor } from "jsoneditor-react";
|
import { JsonEditor as Editor } from "jsoneditor-react";
|
||||||
import "jsoneditor-react/es/editor.min.css";
|
import "jsoneditor-react/es/editor.min.css";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import client from "../../utils/GraphQLClient";
|
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { displayTemplateInWindowNoprint } from "../../utils/RenderTemplate";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -35,22 +30,22 @@ export function ShopTemplateTestRender({
|
|||||||
|
|
||||||
emailEditorRef.current.exportHtml(async (data) => {
|
emailEditorRef.current.exportHtml(async (data) => {
|
||||||
try {
|
try {
|
||||||
const inlineHtml = await axios.post("/render/inlinecss", {
|
// const inlineHtml = await axios.post("/render/inlinecss", {
|
||||||
html: data.html,
|
// html: data.html,
|
||||||
url: `${window.location.protocol}://${window.location.host}/`,
|
// url: `${window.location.protocol}://${window.location.host}/`,
|
||||||
});
|
// });
|
||||||
|
|
||||||
const { data: contextData } = await client.query({
|
// const { data: contextData } = await client.query({
|
||||||
query: gql(query),
|
// query: gql(query),
|
||||||
variables: variables,
|
// variables: variables,
|
||||||
fetchPolicy: "network-only",
|
// fetchPolicy: "network-only",
|
||||||
});
|
// });
|
||||||
|
|
||||||
const renderResponse = await axios.post("/render", {
|
// const renderResponse = await axios.post("/render", {
|
||||||
view: inlineHtml.data,
|
// view: inlineHtml.data,
|
||||||
context: { ...contextData, bodyshop: bodyshop },
|
// context: { ...contextData, bodyshop: bodyshop },
|
||||||
});
|
// });
|
||||||
// displayTemplateInWindowNoprint(renderResponse.data);
|
// displayTemplateInWindowNoprint(renderResponse.data);
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user