Add internal org chat (phase 1) with DM, groups, and org settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-29 10:34:01 +03:30
co-authored by Cursor
parent 589c763ef8
commit a1655432fc
21 changed files with 1912 additions and 8 deletions
+16 -3
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { RouterLink } from 'vue-router';
import type { PlatformStatsDto } from '@mento/shared';
import type { PlatformConversationStatsDto, PlatformStatsDto } from '@mento/shared';
import { platformApi } from '@/lib/platform-api';
import { toFaDigits } from '@/lib/jalali';
import { usePlatformAuthStore } from '@/stores/platform-auth';
@@ -11,13 +11,18 @@ const platform = usePlatformAuthStore();
const loading = ref(true);
const error = ref('');
const stats = ref<PlatformStatsDto | null>(null);
const chatStats = ref<PlatformConversationStatsDto | null>(null);
async function load() {
error.value = '';
loading.value = true;
try {
const { data } = await platformApi.get<PlatformStatsDto>('/platform/stats');
stats.value = data;
const [statsRes, chatRes] = await Promise.all([
platformApi.get<PlatformStatsDto>('/platform/stats'),
platformApi.get<PlatformConversationStatsDto>('/platform/conversations/stats'),
]);
stats.value = statsRes.data;
chatStats.value = chatRes.data;
} catch {
error.value = 'بارگذاری آمار ناموفق بود';
} finally {
@@ -85,6 +90,14 @@ onMounted(() => {
<small>نیاز به تمدید</small>
</div>
</article>
<article v-if="chatStats" class="kpi">
<span class="ico"><UiIcon name="chat" :size="18" /></span>
<div>
<p>گفتگو (پیکربندی‌شده)</p>
<strong>{{ toFaDigits(chatStats.organizationsWithChat) }}</strong>
<small>{{ toFaDigits(chatStats.totalRoomsTracked) }} room ثبت‌شده</small>
</div>
</article>
</div>
<section class="actions">