transfer project in github

This commit is contained in:
hamid.zarghami1@gmail.com
2024-05-12 15:29:27 +03:30
commit e644edbd65
348 changed files with 164991 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
<template>
<CRow>
<CCol sm="12" class="err">
<el-select v-model="branch" filterable style="width: 100%">
<el-option v-for="item in branches" :key="item._id" :value="item._id" :label="item.title || 'شعبه اراک'"/>
</el-select>
</CCol>
</CRow>
</template>
<script>
export default {
name: "Branches",
data () {
return {
branches: [],
branch: null
}
},
mounted() {
// this.branch = this.branches[0]._id
},
async fetch() {
try {
this.branches = await this.$axios.$get(`/api/admin/store/getAll`)
this.branch = this.branches[0]._id
this.$store.commit('admin/set' , ['branchId' , this.branch])
} catch (e) {
if (e?.response?.status === 401) {
this.$nuxt.error({
status: 401,
message: "لطفا دوباره وارد سیستم شوید.",
});
}
if (e?.response?.status === 403) {
this.$nuxt.error({
status: 403,
message: e?.response?.data?.message,
});
}
if (e?.response?.status === 500) {
this.$nuxt.error({
status: 500,
message: "مشکلی در گرفتن اطلاعات پیش آمده",
});
} else
this.$nuxt.error({
status: 404,
message: "اطلاعات مورد نظر پیدا نشد",
});
}
}
}
</script>
<style scoped lang="scss">
</style>
+175
View File
@@ -0,0 +1,175 @@
<template>
<CRow>
<template v-if="!noCharts">
<CCol md="3" sm="6">
<CWidgetBrand
color="facebook"
right-header="89k"
right-footer="friends"
left-header="459"
left-footer="feeds"
>
<CIcon
name="cib-facebook"
height="52"
class="my-4"
/>
<CChartLineSimple
class="c-chart-brand"
background-color="rgba(255,255,255,.1)"
:data-points="[65, 59, 84, 84, 51, 55, 40]"
label="Friends"
labels="months"
/>
</CWidgetBrand>
</CCol>
<CCol md="3" sm="6">
<CWidgetBrand
color="twitter"
right-header="973k"
right-footer="followers"
left-header="1.792"
left-footer="tweets"
>
<CIcon
name="cib-twitter"
height="52"
class="my-4"
/>
<CChartLineSimple
class="c-chart-brand"
background-color="rgba(255,255,255,.1)"
:data-points="[1, 13, 9, 17, 34, 41, 38]"
label="Followers"
labels="months"
/>
</CWidgetBrand>
</CCol>
<CCol md="3" sm="6">
<CWidgetBrand
color="linkedin"
right-header="500+"
right-footer="contracts"
left-header="292"
left-footer="feeds"
>
<CIcon
name="cib-linkedin"
height="52"
class="my-4"
/>
<CChartLineSimple
class="c-chart-brand"
background-color="rgba(255,255,255,.1)"
:data-points="[78, 81, 80, 45, 34, 12, 40]"
label="Contracts"
labels="months"
/>
</CWidgetBrand>
</CCol>
<CCol md="3" sm="6">
<CWidgetBrand
right-header="12"
right-footer="events"
left-header="4"
left-footer="meetings"
color="warning"
>
<CIcon
name="cil-calendar"
height="52"
class="my-4"
/>
<CChartLineSimple
class="c-chart-brand"
background-color="rgba(255,255,255,.1)"
:data-points="[35, 23, 56, 22, 97, 23, 64]"
label="Followers"
labels="months"
/>
</CWidgetBrand>
</CCol>
</template>
<template v-else>
<CCol md="3" sm="6">
<CWidgetBrand
color="facebook"
right-header="89k"
right-footer="friends"
left-header="459"
left-footer="feeds"
>
<CIcon
name="cib-facebook"
height="56"
class="my-4"
/>
</CWidgetBrand>
</CCol>
<CCol md="3" sm="6">
<CWidgetBrand
color="twitter"
right-header="973k"
right-footer="followers"
left-header="1.792"
left-footer="tweets"
>
<CIcon
name="cib-twitter"
height="56"
class="my-4"
/>
</CWidgetBrand>
</CCol>
<CCol md="3" sm="6">
<CWidgetBrand
color="linkedin"
right-header="500+"
right-footer="contracts"
left-header="292"
left-footer="feeds"
>
<CIcon
name="cib-linkedin"
height="56"
class="my-4"
/>
</CWidgetBrand>
</CCol>
<CCol md="3" sm="6">
<CWidgetBrand
right-header="12"
right-footer="events"
left-header="4"
left-footer="meetings"
color="warning"
>
<CIcon
name="cil-calendar"
height="56"
class="my-4"
/>
</CWidgetBrand>
</CCol>
</template>
</CRow>
</template>
<script>
export default {
name: 'WidgetsBrand',
props: {
noCharts: Boolean
},
layout: 'admin'
}
</script>
<style scoped>
.c-chart-brand {
position: absolute;
width: 100%;
height: 100px;
}
</style>
@@ -0,0 +1,136 @@
<template>
<CRow>
<CCol sm="6" lg="3">
<CWidgetDropdown color="primary" header="9.823" text="Members online">
<template #default>
<CDropdown
color="transparent p-0"
placement="bottom-end"
>
<template #toggler-content>
<CIcon name="cil-settings"/>
</template>
<CDropdownItem>Action</CDropdownItem>
<CDropdownItem>Another action</CDropdownItem>
<CDropdownItem>Something else here...</CDropdownItem>
<CDropdownItem disabled>Disabled action</CDropdownItem>
</CDropdown>
</template>
<template #footer>
<CChartLineSimple
pointed
class="mt-3 mx-3"
style="height:70px"
:data-points="[65, 59, 84, 84, 51, 55, 40]"
point-hover-background-color="primary"
label="Members"
labels="months"
/>
</template>
</CWidgetDropdown>
</CCol>
<CCol sm="6" lg="3">
<CWidgetDropdown color="info" header="9.823" text="Members online">
<template #default>
<CDropdown
color="transparent p-0"
placement="bottom-end"
:caret="false"
>
<template #toggler-content>
<CIcon name="cil-location-pin"/>
</template>
<CDropdownItem>Action</CDropdownItem>
<CDropdownItem>Another action</CDropdownItem>
<CDropdownItem>Something else here...</CDropdownItem>
<CDropdownItem disabled>Disabled action</CDropdownItem>
</CDropdown>
</template>
<template #footer>
<CChartLineSimple
pointed
class="mt-3 mx-3"
style="height:70px"
:data-points="[1, 18, 9, 17, 34, 22, 11]"
point-hover-background-color="info"
:options="{ elements: { line: { tension: 0.00001 }}}"
label="Members"
labels="months"
/>
</template>
</CWidgetDropdown>
</CCol>
<CCol sm="6" lg="3">
<CWidgetDropdown
color="warning"
header="9.823"
text="Members online"
>
<template #default>
<CDropdown
color="transparent p-0"
placement="bottom-end"
>
<template #toggler-content>
<CIcon name="cil-settings"/>
</template>
<CDropdownItem>Action</CDropdownItem>
<CDropdownItem>Another action</CDropdownItem>
<CDropdownItem>Something else here...</CDropdownItem>
<CDropdownItem disabled>Disabled action</CDropdownItem>
</CDropdown>
</template>
<template #footer>
<CChartLineSimple
class="mt-3"
style="height:70px"
background-color="rgba(255,255,255,.2)"
:data-points="[78, 81, 80, 45, 34, 12, 40]"
:options="{ elements: { line: { borderWidth: 2.5 }}}"
point-hover-background-color="warning"
label="Members"
labels="months"
/>
</template>
</CWidgetDropdown>
</CCol>
<CCol sm="6" lg="3">
<CWidgetDropdown
color="danger"
header="9.823"
text="Members online"
>
<template #default>
<CDropdown
color="transparent p-0"
placement="bottom-end"
>
<template #toggler-content>
<CIcon name="cil-settings"/>
</template>
<CDropdownItem>Action</CDropdownItem>
<CDropdownItem>Another action</CDropdownItem>
<CDropdownItem>Something else here...</CDropdownItem>
<CDropdownItem disabled>Disabled action</CDropdownItem>
</CDropdown>
</template>
<template #footer>
<CChartBarSimple
class="mt-3 mx-3"
style="height:70px"
background-color="rgb(250, 152, 152)"
label="Members"
labels="months"
/>
</template>
</CWidgetDropdown>
</CCol>
</CRow>
</template>
<script>
export default {
name: 'WidgetsDropdown',
layout: 'admin'
}
</script>