Merged in release/2022-04-15 (pull request #446)
release/2022-04-15 Approved-by: Patrick Fic
This commit is contained in:
@@ -4,7 +4,7 @@ import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setPartnerVersion } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
|
||||
import {store} from '../../redux/store'
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -18,7 +18,7 @@ export default connect(
|
||||
mapDispatchToProps
|
||||
)(PartnerPingComponent);
|
||||
|
||||
export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
||||
export function PartnerPingComponent({ bodyshop, }) {
|
||||
useEffect(() => {
|
||||
// Create an scoped async function in the hook
|
||||
|
||||
@@ -30,7 +30,7 @@ export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export async function checkPartnerStatus(bodyshop, checkAcctPath = false) {
|
||||
export async function checkPartnerStatus(bodyshop) {
|
||||
if (!bodyshop) return;
|
||||
try {
|
||||
//if (process.env.NODE_ENV === "development") return;
|
||||
@@ -38,7 +38,8 @@ export async function checkPartnerStatus(bodyshop, checkAcctPath = false) {
|
||||
// const {
|
||||
// appver, //qbpath
|
||||
// } = PartnerResponse.data;
|
||||
setPartnerVersion(PartnerResponse.data);
|
||||
console.log(PartnerResponse.data)
|
||||
store.dispatch(setPartnerVersion(PartnerResponse.data));
|
||||
// if (
|
||||
// checkAcctPath &&
|
||||
// !qbpath &&
|
||||
|
||||
@@ -39,30 +39,30 @@ function VendorsFormContainer({ refetch, bodyshop }) {
|
||||
const [insertvendor] = useMutation(INSERT_NEW_VENDOR);
|
||||
const [deleteVendor] = useMutation(DELETE_VENDOR);
|
||||
|
||||
const handleDelete = () => {
|
||||
const handleDelete = async () => {
|
||||
setFormLoading(true);
|
||||
deleteVendor({
|
||||
const result = await deleteVendor({
|
||||
variables: { id: selectedvendor },
|
||||
refetchQueries: ["QUERY_ALL_VENDORS"],
|
||||
})
|
||||
.then((r) => {
|
||||
notification["success"]({
|
||||
message: t("vendors.successes.deleted"),
|
||||
});
|
||||
delete search.selectedvendor;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
if (refetch)
|
||||
refetch().then((r) => {
|
||||
form.resetFields();
|
||||
});
|
||||
setFormLoading(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
notification["error"]({
|
||||
message: t("vendors.errors.deleting"),
|
||||
});
|
||||
setFormLoading(false);
|
||||
});
|
||||
console.log(result);
|
||||
if (result.errors) {
|
||||
notification["error"]({
|
||||
message: t("vendors.errors.deleting"),
|
||||
});
|
||||
} else {
|
||||
notification["success"]({
|
||||
message: t("vendors.successes.deleted"),
|
||||
});
|
||||
delete search.selectedvendor;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
if (refetch)
|
||||
refetch().then((r) => {
|
||||
form.resetFields();
|
||||
});
|
||||
}
|
||||
|
||||
setFormLoading(false);
|
||||
};
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
|
||||
@@ -48,10 +48,12 @@ export function JobsAvailablePageContainer({
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
<AlertComponent
|
||||
type="warning"
|
||||
message={t("general.messages.partnernotrunning")}
|
||||
/>
|
||||
{!partnerVersion && (
|
||||
<AlertComponent
|
||||
type="warning"
|
||||
message={t("general.messages.partnernotrunning")}
|
||||
/>
|
||||
)}
|
||||
<JobsAvailableTableContainer />
|
||||
</div>
|
||||
</RbacWrapper>
|
||||
|
||||
1
hasura/metadata/network.yaml
Normal file
1
hasura/metadata/network.yaml
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."bodyshops" add column "bill_allow_post_to_closed" boolean
|
||||
-- not null default 'false';
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."bodyshops" add column "bill_allow_post_to_closed" boolean
|
||||
not null default 'false';
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."jobs" add column "auto_add_ats" boolean
|
||||
-- null default 'false';
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."jobs" add column "auto_add_ats" boolean
|
||||
null default 'false';
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."jobs" add column "rate_ats" numeric
|
||||
-- null;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."jobs" add column "rate_ats" numeric
|
||||
null;
|
||||
Reference in New Issue
Block a user