IO-1708 Add shop timezone & update server side calculations.
This commit is contained in:
@@ -41,6 +41,9 @@ import UserActionTypes from "./user.types";
|
||||
import axios from "axios";
|
||||
import { messaging } from "../../firebase/firebase.utils";
|
||||
import { getToken } from "firebase/messaging";
|
||||
|
||||
import moment from "moment-timezone";
|
||||
|
||||
export function* onEmailSignInStart() {
|
||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||
}
|
||||
@@ -266,6 +269,12 @@ export function* onSetShopDetails() {
|
||||
export function* SetAuthLevelFromShopDetails({ payload }) {
|
||||
try {
|
||||
const userEmail = yield select((state) => state.user.currentUser.email);
|
||||
try {
|
||||
console.log("Setting shop timezone.");
|
||||
moment.tz.setDefault(payload.timezone);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
factory.client(payload.imexshopid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user