feat(forms): merge notes tab into main info for activity and deal forms; show activity hashtags
- Activity form: notes/tags card inline, live hashtag preview, focus notes when required - Hashtags shown in activity detail (clickable search) and list rows; search accepts #tag - Deal form: remove mobile tabs Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -68,7 +68,6 @@ const pageTitle = computed(() => (isNew.value ? 'ایجاد معامله جدی
|
||||
const loading = ref(false);
|
||||
const saving = ref(false);
|
||||
const error = ref('');
|
||||
const tab = ref<'main' | 'notes'>('main');
|
||||
const showOthers = ref(true);
|
||||
const productsOpen = ref(false);
|
||||
const openMenu = ref<MenuKey>('');
|
||||
@@ -373,7 +372,6 @@ async function submit() {
|
||||
const message = validate();
|
||||
if (message) {
|
||||
error.value = message;
|
||||
tab.value = 'main';
|
||||
return;
|
||||
}
|
||||
saving.value = true;
|
||||
@@ -473,15 +471,10 @@ onMounted(load);
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<nav class="tabs">
|
||||
<button type="button" :class="{ on: tab === 'main' }" @click="tab = 'main'">اطلاعات اصلی</button>
|
||||
<button type="button" :class="{ on: tab === 'notes' }" @click="tab = 'notes'">توضیحات و یادداشت</button>
|
||||
</nav>
|
||||
|
||||
<p v-if="loading" class="muted">در حال بارگذاری…</p>
|
||||
|
||||
<form v-else class="form" @submit.prevent="submit">
|
||||
<div v-show="tab === 'main'" class="stack">
|
||||
<div class="stack">
|
||||
<section class="card main-card">
|
||||
<h2 class="sec">
|
||||
<i class="dot" />
|
||||
@@ -804,7 +797,7 @@ onMounted(load);
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="card note-card" :class="{ off: tab !== 'notes' }">
|
||||
<div class="card note-card">
|
||||
<label for="notes">توضیحات و یادداشت</label>
|
||||
<textarea
|
||||
id="notes"
|
||||
@@ -817,14 +810,12 @@ onMounted(load);
|
||||
<RelatedTasksPanel
|
||||
v-if="!isNew && id"
|
||||
class="timeline"
|
||||
:class="{ hide: tab !== 'main' }"
|
||||
:entity="{ type: 'deal', id, label: title }"
|
||||
/>
|
||||
|
||||
<EntityTimeline
|
||||
v-if="!isNew && id"
|
||||
class="timeline"
|
||||
:class="{ hide: tab !== 'main' }"
|
||||
entity-type="deal"
|
||||
:entity-id="id"
|
||||
/>
|
||||
@@ -944,27 +935,6 @@ h1 {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
gap: 1.2rem;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
.tabs button {
|
||||
border: 0;
|
||||
background: none;
|
||||
padding: 0.55rem 0;
|
||||
font: inherit;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tabs .on {
|
||||
color: #0f766e;
|
||||
font-weight: 600;
|
||||
box-shadow: inset 0 -2px 0 #14b8a6;
|
||||
}
|
||||
|
||||
.form,
|
||||
.stack {
|
||||
display: grid;
|
||||
@@ -1397,13 +1367,8 @@ h1 {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.note-card.off,
|
||||
.timeline.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note-card textarea {
|
||||
min-height: 12rem;
|
||||
min-height: 7rem;
|
||||
width: 100%;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: var(--radius);
|
||||
@@ -1492,18 +1457,12 @@ h1 {
|
||||
}
|
||||
|
||||
.mobile-head,
|
||||
.tabs,
|
||||
.kind-field,
|
||||
.follow-up,
|
||||
.mobile-save {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note-card.off,
|
||||
.timeline.hide {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.sec {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user