This commit is contained in:
Mr Swift
2024-03-09 20:10:55 +03:30
parent 3c1a7da256
commit 379929844a
9 changed files with 48 additions and 35 deletions
+1 -2
View File
@@ -3,8 +3,7 @@
<CustomSubHeader>
<CBreadcrumb class="border-0 mb-0"> برندها </CBreadcrumb>
<CButton size="sm" color="success" :to="{ name: 'admin-brands-item', params: { item: 'new' } }" class="mr-auto"
>افزودن</CButton
>
>افزودن</CButton>
</CustomSubHeader>
<CCard>
<CCardHeader>
+45 -24
View File
@@ -1,20 +1,20 @@
<template>
<div class="bg-img-in">
<user-dashboard-container page-class="complaint" panel-title="ثبت شکایت" class="panelx">
<user-dashboard-container page-class="complaint" :panel-title="brand?.title" class="panelx">
<div class="row">
<div class="col-lg-6 col-sm-12 p-3">
<p>مشتری گرامی شما میتوانید شکایت خود را از طریق فرم زیر با ما در میان بگذارید</p>
<div class="col-lg-4 col-sm-12 p-3" style="display: flex; justify-content: center;">
<img :src="'/uploads/images/brands/' + brand?.logo" width="250">
</div>
<div class="col-lg-6 col-sm-12 p-3">
<p>{{ config.complaint }}</p>
<div class="col-lg-8 col-sm-12 p-3" style="display: flex; justify-content: center;">
<p>{{ brand?.description }}</p>
</div>
<div class="col-lg-12 col-sm-12 p-3" style="display: flex; justify-content: center;">
<CButton size="md" color="success" :href="brand.link" class="mr-auto"
>بازدید در آسان مارکت</CButton>
</div>
</div>
</user-dashboard-container>
</div>
@@ -26,17 +26,22 @@
data() {
return {
form:{
brands:true
},
brand:{
title:'',
logo:'',
description:''
}
}
},
computed: {
config() {
return this.$config
}
mounted() {
this.$axios.get('/api/public/brand/'+this.$route.params.item).then((res)=>{
this.brand = res.data
console.log(res)
})
},
mounted() {},
}
</script>
@@ -49,18 +54,24 @@
border-radius: 8px;
}
.bg-img-in {
background: url(@/static/assets/img/home/bg3.jpeg);
background: url(@/static/assets/img/home/bg4.jpg);
background-size: cover;
background-repeat: no-repeat;
border-top: groove;
max-height: calc(100vh + 100px);
}
.panelx {
margin-top: 20%;
margin-top: 25%;
margin-left: auto;
margin-right: auto;
width: 80% !important;
}
.btn-success{
border-color: #1063a7;
background-color: #065495;
color: aliceblue;
}
.el-switch__label--right {
margin-right: 10px !important;
}
@@ -69,4 +80,14 @@
margin-left: 10px !important;
}
</style>
<style>
.panel-title p{
color: rgb(148, 148, 148) !important;
text-shadow: 0.5px 0.5px 1px #dadada;
padding-right: 2px;
}
.panel{
min-height: max-content !important;
border-radius : 8px !important;
}
</style>
-2
View File
@@ -13,8 +13,6 @@ const createbrand = [
[
body('title').notEmpty().withMessage(_sr.fa.required.title),
body('description').notEmpty().withMessage(_sr.fa.required.description),
body('link').notEmpty().trim().isLowercase().withMessage(_sr.fa.required.field),
],
checkValidations(validationResult),
async (req, res) => {
+1 -5
View File
@@ -3,14 +3,10 @@ const mongoose = require('mongoose');
const brandSchema = new mongoose.Schema({
title: String,
link: {
type: String,
unique: [true, "This link already taken"]
type: String
},
description: String,
logo: String,
},
{
timestamps: true,
}
);
+1 -1
View File
@@ -25,7 +25,7 @@ router.post('/survey', surveyController.createPublic)
/// ///////////// Brand
router.get('/brand', brandController.getbrands)
router.get('/brand/:id', brandController.getbrand)
/// ///////////// Complaint
router.post('/complaint', complaintController.create)
Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

-1
View File
@@ -1 +0,0 @@
#