|
|
@@ -171,6 +171,12 @@ const phone = ref("");
|
|
|
const registrationCompleted = ref(false);
|
|
|
const showSubStep = ref(false);
|
|
|
|
|
|
+const isPendingProvider = computed(
|
|
|
+ () =>
|
|
|
+ String(user.user?.type).toUpperCase() === "PROVIDER" &&
|
|
|
+ user.user?.provider?.approval_status === "pending",
|
|
|
+);
|
|
|
+
|
|
|
const createInitialStepFiveForm = () => ({
|
|
|
daily_price_2h: null,
|
|
|
daily_price_4h: null,
|
|
|
@@ -568,6 +574,12 @@ const validateCodeInput = async () => {
|
|
|
if (isLogin.value === true) {
|
|
|
await setAuthDataFromPayload(response.data.payload);
|
|
|
|
|
|
+ if (isPendingProvider.value) {
|
|
|
+ registrationCompleted.value = true;
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
router.push({ name: "DashboardPage" });
|
|
|
|
|
|
return;
|
|
|
@@ -612,12 +624,7 @@ const validateCurrentStep = async () => {
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
- const isPendingProvider =
|
|
|
- user.accessToken &&
|
|
|
- String(user.user?.type).toUpperCase() === "PROVIDER" &&
|
|
|
- user.user?.provider?.approval_status !== "accepted";
|
|
|
-
|
|
|
- if (isPendingProvider) {
|
|
|
+ if (user.accessToken && isPendingProvider.value) {
|
|
|
registrationCompleted.value = true;
|
|
|
clicked.value = true;
|
|
|
|