feat(trade): wait on colleague order until status is final

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 15:55:08 +03:30
co-authored by Cursor
parent 164bb267f1
commit 0d19412c96
6 changed files with 222 additions and 15 deletions
+11
View File
@@ -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