Merged in feature/america (pull request #947)

Feature/america
This commit is contained in:
Patrick Fic
2023-08-24 18:19:26 +00:00
4 changed files with 15 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ export function JoblineBulkAssign({
hours.toFixed(1)
),
});
setSelectedLines([]);
setVisible(false);
}
} catch (error) {

View File

@@ -153,7 +153,7 @@ export function TimeTicketModalContainer({
if (!!changedFields.cost_center && !!EmployeeAutoCompleteData) {
form.setFieldsValue({
ciecacode:
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatments === 'on'
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === 'on'
? changedFields.cost_center
: Object.keys(
bodyshop.md_responsibility_centers.defaults.costs

View File

@@ -197,6 +197,14 @@ export function* signInSuccessSaga({ payload }) {
LogRocket.identify(payload.email);
try {
window.$crisp.push([
"set",
"user:nickname",
[payload.displayName || payload.email],
]);
window.$crisp.push(["set", "session:segments", [["rome-user"]]]);
Sentry.setUser({
email: payload.email,
username: payload.displayName || payload.email,
@@ -280,6 +288,10 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
)
);
try {
window.$crisp.push(["set", "user:company", [payload.shopname]]);
if (authRecord[0] && authRecord[0].user.validemail) {
window.$crisp.push(["set", "user:email", [authRecord[0].user.email]]);
}
} catch (error) {
console.error("Couldnt find $crisp.");
}

View File

@@ -8,8 +8,7 @@ require("dotenv").config({
function urlBuilder(realmId, object, query = null) {
return `https://${
//process.env.NODE_ENV === "production" ? "" :
"sandbox-"
process.env.NODE_ENV === "production" ? "" : "sandbox-"
}quickbooks.api.intuit.com/v3/company/${realmId}/${object}${
query ? `?query=${encodeURIComponent(query)}` : ""
}`;