|
1 | 1 | <script setup lang="ts"> |
2 | | -import { createResource, FormControl } from 'frappe-ui' |
| 2 | +import { createResource, FormControl, Tooltip } from 'frappe-ui' |
3 | 3 | import { computed, inject, onMounted, ref, useTemplateRef, watch } from 'vue' |
4 | 4 | import EmailInput from '@/components/EmailInput.vue' |
5 | 5 | import PhoneInput from '@/components/PhoneInput.vue' |
6 | 6 | import PostRegistrationMessage from '@/onboarding/modal/PostRegistrationMessage.vue' |
7 | 7 | import { usePartnerOnboarding } from '@/onboarding/usePartnerOnboarding' |
| 8 | +import LucideInfo from '~icons/lucide/info' |
8 | 9 |
|
9 | 10 | const emit = defineEmits(['registered']) |
10 | 11 |
|
@@ -101,9 +102,14 @@ const handleSubmit = async () => { |
101 | 102 |
|
102 | 103 | try { |
103 | 104 | await onboarding.save() |
104 | | - await onboarding.loadMRRStatus() |
105 | 105 | registered.value = true |
106 | 106 | emit('registered') |
| 107 | + // Fetch MRR in the background (fire-and-forget). It isn't shown on the |
| 108 | + // success screen, and the query can be slow against a large Invoice table, |
| 109 | + // so it must not block registration. We still trigger it here because the |
| 110 | + // modal can be opened from the partner-onboarding page itself — in which |
| 111 | + // case "Continue" doesn't re-navigate and the page's load() won't re-run. |
| 112 | + void onboarding.loadMRRStatus() |
107 | 113 | } catch (error: any) { |
108 | 114 | // Backend validation (e.g. the Phone field) wraps values in <strong> |
109 | 115 | // tags via frappe.bold(); strip them so they don't render as literal |
@@ -148,16 +154,25 @@ function stripHtmlTags(value: string) { |
148 | 154 | {{ errors.company_name }} |
149 | 155 | </p> |
150 | 156 |
|
151 | | - <FormControl |
152 | | - v-model="onboarding.form.registered_country" |
153 | | - label="Registered country" |
154 | | - type="select" |
155 | | - size="sm" |
156 | | - variant="outline" |
157 | | - placeholder="Select" |
158 | | - :options="countryOptions" |
159 | | - :class="{ 'has-error': errors.country }" |
160 | | - /> |
| 157 | + <div class="flex flex-col gap-1.5"> |
| 158 | + <div class="flex items-end gap-1"> |
| 159 | + <label class="block text-xs text-ink-gray-5">Registered country</label> |
| 160 | + <Tooltip |
| 161 | + text="You'll be listed as a partner in this country, subject to approval and verification." |
| 162 | + > |
| 163 | + <LucideInfo class="h-3 w-3 text-ink-gray-5" /> |
| 164 | + </Tooltip> |
| 165 | + </div> |
| 166 | + <FormControl |
| 167 | + v-model="onboarding.form.registered_country" |
| 168 | + type="select" |
| 169 | + size="sm" |
| 170 | + variant="outline" |
| 171 | + placeholder="Select" |
| 172 | + :options="countryOptions" |
| 173 | + :class="{ 'has-error': errors.country }" |
| 174 | + /> |
| 175 | + </div> |
161 | 176 | <p v-if="errors.country" class="-mt-2 text-sm text-ink-red-4"> |
162 | 177 | {{ errors.country }} |
163 | 178 | </p> |
|
0 commit comments