transfer project in github
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<CustomSubHeader>
|
||||
<CBreadcrumb class="border-0 mb-0">{{ title }}</CBreadcrumb>
|
||||
<CButton size="sm" color="primary" class="mr-auto" :to="{name: 'admin-subscribers'}">برگشت به صفحه قبل</CButton>
|
||||
</CustomSubHeader>
|
||||
<CRow>
|
||||
<CCol>
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<CRow>
|
||||
<CCol lg="6">
|
||||
<CForm>
|
||||
<template v-if="$route.params.profile !== 'new'">
|
||||
<h4>اطلاعات فرم</h4>
|
||||
<el-divider/>
|
||||
</template>
|
||||
<CRow>
|
||||
<CCol sm="12">
|
||||
<CInput
|
||||
label="نام"
|
||||
disabled
|
||||
:value="subscriber.full_name"
|
||||
/>
|
||||
</CCol>
|
||||
|
||||
<CCol sm="12">
|
||||
<CInput
|
||||
label="تاریخ ازدواج"
|
||||
disabled
|
||||
:value="subscriber.birth_date"
|
||||
/>
|
||||
</CCol>
|
||||
|
||||
|
||||
<CCol sm="12">
|
||||
<CInput
|
||||
label="شماره تماس"
|
||||
disabled
|
||||
class="subs_phone_number"
|
||||
:value="subscriber.mobile"
|
||||
/>
|
||||
</CCol>
|
||||
|
||||
<CCol sm="12">
|
||||
<CInput
|
||||
label="ایمیل"
|
||||
disabled
|
||||
:value="subscriber.email"
|
||||
/>
|
||||
</CCol>
|
||||
|
||||
<CCol sm="12">
|
||||
<CTextarea
|
||||
label="آدرس"
|
||||
disabled
|
||||
:value="subscriber.address"
|
||||
/>
|
||||
</CCol>
|
||||
|
||||
</CRow>
|
||||
</CForm>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
|
||||
</CCol>
|
||||
|
||||
</CRow>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'اطلاعات فرم',
|
||||
subscriber: null
|
||||
}
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: this.title
|
||||
}
|
||||
},
|
||||
layout: 'admin',
|
||||
async asyncData({$axios, params, error}) {
|
||||
try {
|
||||
const subscriber = await $axios.get(`/api/admin/subscriber/${params.subscriber}`)
|
||||
return {
|
||||
subscriber: subscriber.data
|
||||
}
|
||||
} catch (e) {
|
||||
if (e?.response?.status === 401) {
|
||||
error({
|
||||
status: 401,
|
||||
message: "لطفا دوباره وارد سیستم شوید.",
|
||||
});
|
||||
}
|
||||
if (e?.response?.status === 403) {
|
||||
error({
|
||||
status: 403,
|
||||
message: e?.response?.data?.message,
|
||||
});
|
||||
}
|
||||
if (e?.response?.status === 500) {
|
||||
error({
|
||||
status: 500,
|
||||
message: "مشکلی در گرفتن اطلاعات پیش آمده",
|
||||
});
|
||||
} else
|
||||
error({
|
||||
status: 404,
|
||||
message: "اطلاعات مورد نظر پیدا نشد",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.subs_phone_number input{
|
||||
direction: ltr !important;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user