Edit the operations column for automated SMS rules.

This commit is contained in:
2026-09-15 11:05:29 +03:30
parent 76acf8d1d3
commit 8dcf4ed5e9
+58 -17
View File
@@ -1057,8 +1057,7 @@ onUnmounted(() => {
<th>زمان‌بندی</th> <th>زمان‌بندی</th>
<th>مخاطب</th> <th>مخاطب</th>
<th>کانال</th> <th>کانال</th>
<th>فعال</th> <th>عملیات</th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -1071,19 +1070,24 @@ onUnmounted(() => {
<td>{{ scheduleLabel(row) }}</td> <td>{{ scheduleLabel(row) }}</td>
<td>{{ MESSAGE_AUTOMATION_TARGET_LABELS[row.notifyTarget] }}</td> <td>{{ MESSAGE_AUTOMATION_TARGET_LABELS[row.notifyTarget] }}</td>
<td>{{ MESSAGE_AUTOMATION_CHANNEL_LABELS[row.channel] }}</td> <td>{{ MESSAGE_AUTOMATION_CHANNEL_LABELS[row.channel] }}</td>
<td> <td class="ops">
<button <button
class="toggle" class="icon-btn status"
type="button" type="button"
:class="{ on: row.isActive }" :class="{ on: row.isActive }"
:aria-pressed="row.isActive" :aria-pressed="row.isActive"
:aria-label="row.isActive ? 'فعال' : 'غیرفعال'" :aria-label="row.isActive ? 'فعال' : 'غیرفعال'"
:title="row.isActive ? 'فعال' : 'غیرفعال'"
@click="toggle(row)" @click="toggle(row)"
/> >
</td> <UiIcon :name="row.isActive ? 'check-plain' : 'x'" :size="16" />
<td class="ops"> </button>
<button class="btn ghost" type="button" @click="startEdit(row)">ویرایش</button> <button class="icon-btn" type="button" title="ویرایش" aria-label="ویرایش" @click="startEdit(row)">
<button class="btn danger" type="button" @click="remove(row)">حذف</button> <UiIcon name="pencil" :size="16" />
</button>
<button class="icon-btn danger" type="button" title="حذف" aria-label="حذف" @click="remove(row)">
<UiIcon name="trash" :size="16" />
</button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -1797,17 +1801,54 @@ textarea {
opacity: 0.62; opacity: 0.62;
} }
.desk-table .preview { .desk-table .ops {
display: block; display: flex;
margin-top: 0.2rem; align-items: center;
color: #94a3b8; gap: 0.3rem;
font-size: 0.75rem; flex-wrap: nowrap;
max-width: 18rem; width: 1%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.icon-btn {
display: grid;
place-items: center;
width: 36px;
height: 36px;
padding: 0;
border: 1px solid #e2e8f0;
border-radius: var(--radius);
background: #fff;
color: #64748b;
cursor: pointer;
}
.icon-btn:hover {
background: #f8fafc;
color: #0f172a;
}
.icon-btn.danger {
color: #b91c1c;
border-color: #fecaca;
}
.icon-btn.danger:hover {
background: #fef2f2;
}
.icon-btn.status {
border-color: #fecaca;
background: #fef2f2;
color: #dc2626;
}
.icon-btn.status.on {
border-color: #bbf7d0;
background: #f0fdf4;
color: #16a34a;
}
.mobile-cards { .mobile-cards {
display: grid; display: grid;
gap: 0.75rem; gap: 0.75rem;