feat(trade): wait on colleague order until status is final
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
@@ -104,6 +104,7 @@
|
||||
</div>
|
||||
|
||||
<GoldDayCalculatorModal />
|
||||
<GoldLoading v-model:show="colleagueOrderWaiting" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -129,6 +130,8 @@ import EnamadBadge from '@/components/EnamadBadge.vue'
|
||||
import { usePwaInstall } from '@/composables/usePwaInstall'
|
||||
import PwaInstallGuideModal from '@/components/pwa/PwaInstallGuideModal.vue'
|
||||
import GoldDayCalculatorModal from '@/components/GoldDayCalculatorModal.vue'
|
||||
import GoldLoading from '@/components/GoldLoading.vue'
|
||||
import { colleagueOrderWaiting, resumeColleagueOrderIfPending } from '@/composables/useColleagueOrderWait'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { useSettingsStore } from '@/store/settingsStore'
|
||||
import { connectChatIfExists, disconnectChat, isSettingFlagOn, unreadSupportCount, useChatService } from '@/utils/chat'
|
||||
@@ -272,6 +275,14 @@ watch(
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
watch(
|
||||
() => getToken(),
|
||||
(token) => {
|
||||
if (token) void resumeColleagueOrderIfPending()
|
||||
},
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
watch(latestIncomingNotification, (payload) => {
|
||||
if (!payload) return
|
||||
if (payload.at === lastSupportToastAt) return
|
||||
|
||||
Reference in New Issue
Block a user