fix: polish SMS header chip and add deposit info in adm panel
Tighten the wallet chip layout and let super-admins set charge deposit details shown in the header charge modal.
This commit is contained in:
@@ -25,6 +25,10 @@ const ownUser = ref('');
|
||||
const ownPass = ref('');
|
||||
const ownFrom = ref('');
|
||||
const ownType = ref('0098');
|
||||
const depositCard = ref('');
|
||||
const depositIban = ref('');
|
||||
const depositHolder = ref('');
|
||||
const depositInstruction = ref('');
|
||||
|
||||
function formatRials(n: number) {
|
||||
return toFaDigits(new Intl.NumberFormat('fa-IR').format(n)) + ' ریال';
|
||||
@@ -51,6 +55,10 @@ async function loadOverview(orgId: string) {
|
||||
ownPass.value = '';
|
||||
ownFrom.value = data.account.ownPanelFrom || '';
|
||||
ownType.value = data.account.ownPanelType || '0098';
|
||||
depositCard.value = data.chargeInfo.card || '';
|
||||
depositIban.value = data.chargeInfo.iban || '';
|
||||
depositHolder.value = data.chargeInfo.accountHolder || '';
|
||||
depositInstruction.value = data.chargeInfo.instruction || '';
|
||||
}
|
||||
|
||||
async function load() {
|
||||
@@ -155,6 +163,18 @@ function saveOwnPanel() {
|
||||
});
|
||||
}
|
||||
|
||||
function saveDepositInfo() {
|
||||
if (!selectedId.value) return;
|
||||
void runSave(async () => {
|
||||
await platformApi.patch(`/platform/sms/organizations/${selectedId.value}`, {
|
||||
chargeCard: depositCard.value.trim() || null,
|
||||
chargeIban: depositIban.value.trim() || null,
|
||||
chargeHolder: depositHolder.value.trim() || null,
|
||||
chargeInstruction: depositInstruction.value.trim() || null,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => route.query.org,
|
||||
() => {
|
||||
@@ -307,6 +327,34 @@ onMounted(() => {
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="panel deposit-panel">
|
||||
<h3>اطلاعات واریز شارژ</h3>
|
||||
<p class="hint">نمایش در مودال «شارژ» هدر برای همه مدیران این محیط</p>
|
||||
<label class="field">
|
||||
<span>شماره کارت</span>
|
||||
<input v-model="depositCard" type="text" dir="ltr" placeholder="مثلاً 6219…" />
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>شماره شبا</span>
|
||||
<input v-model="depositIban" type="text" dir="ltr" placeholder="IR…" />
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>به نام</span>
|
||||
<input v-model="depositHolder" type="text" placeholder="صاحب حساب" />
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>متن راهنما</span>
|
||||
<textarea
|
||||
v-model="depositInstruction"
|
||||
rows="3"
|
||||
placeholder="متن راهنمای واریز برای مدیران"
|
||||
/>
|
||||
</label>
|
||||
<button type="button" class="btn btn-primary" :disabled="saving" @click="saveDepositInfo">
|
||||
ذخیره
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tables">
|
||||
@@ -393,13 +441,32 @@ onMounted(() => {
|
||||
}
|
||||
.list-head input,
|
||||
.panel input,
|
||||
.panel select {
|
||||
.panel select,
|
||||
.panel textarea {
|
||||
width: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
padding: 0.55rem 0.7rem;
|
||||
font: inherit;
|
||||
}
|
||||
.panel textarea {
|
||||
resize: vertical;
|
||||
min-height: 4.5rem;
|
||||
}
|
||||
.deposit-panel {
|
||||
grid-column: 1 / -1;
|
||||
background: color-mix(in srgb, #ede9fe 35%, #fff);
|
||||
border-color: #ddd6fe;
|
||||
}
|
||||
.field {
|
||||
display: grid;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
.field > span {
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
color: #475569;
|
||||
}
|
||||
.tenant {
|
||||
width: 100%;
|
||||
text-align: start;
|
||||
|
||||
Reference in New Issue
Block a user