fix: items & style

This commit is contained in:
zeinab.ashrafi
2025-03-29 14:52:44 +03:30
parent c872feb468
commit 0fcb9a3b2f
6 changed files with 160 additions and 204 deletions
+1
View File
@@ -71,6 +71,7 @@ export default {
font-size: 22px !important;
text-transform: uppercase !important;
font-family: 'Montserrat-Regular' !important;
line-height: 23px !important;
}
.subheading {
+30 -14
View File
@@ -18,6 +18,7 @@
font-weight: bold;
src: url('../../fonts/Montserrat-Bold.ttf') format('truetype');
}
@font-face {
font-family: 'Montserrat-light';
font-style: normal;
@@ -109,6 +110,7 @@ h3.CSSD-font {
.WM-LightGray-BG {
background-color: #eee !important;
}
.WM-OrangeGradient-BG {
background: linear-gradient(-245.99599235188236deg, rgba(252, 184, 162, 1) -0.3020833333333286%, rgba(255, 236, 210, 1) 93.03125%);
}
@@ -153,6 +155,23 @@ h3.CSSD-font {
background: linear-gradient(to right, #ee9ca7, #ffdde1);
}
.WM-CyanGradient-BG {
background: linear-gradient(90deg, #32CAD5 0%, #17949D 100%);
}
.WM-DeepBlueGradient-BG {
background: linear-gradient(90deg, #4D8BE8 0%, #2358A6 100%);
}
.WM-PurpleGradient-BG {
background: linear-gradient(90deg, #AC3773 0%, #7D144A 100%);
}
.WM-RedGradient-BG {
background: linear-gradient(90deg, #EE3552 0%, #B30E28 100%);
}
.WM-LightGray-color {
color: rgba(33, 33, 33, .7)
}
@@ -183,7 +202,7 @@ h3.CSSD-font {
position: absolute;
}
.inputfile+label {
.inputfile + label {
font-size: 16px;
display: inline-block;
font-weight: 400;
@@ -196,8 +215,8 @@ h3.CSSD-font {
border-radius: 5px;
}
.inputfile:focus+label,
.inputfile+label:hover {
.inputfile:focus + label,
.inputfile + label:hover {
border: 1px solid #000;
color: #000;
@@ -208,7 +227,8 @@ h3.CSSD-font {
color: #000 !important;
}
.v-pagination>li:focus {}
.v-pagination > li:focus {
}
.theme--light.v-pagination .v-pagination__item:focus {
outline: 0 !important;
@@ -249,8 +269,7 @@ td.FlexBtn a.LinkBtn .theme--light.v-btn {
}
.ResultMsg.Accept {
background: #1DE6B8;
;
background: #1DE6B8;;
}
.theme--light.v-icon.Verified {
@@ -312,13 +331,13 @@ td.FlexBtn .theme--light.v-icon {
margin-right: 0 !important;
}
@media screen and (min-width : 1900px) {
@media screen and (min-width: 1900px) {
.WM-XL-Align-L {
text-align: left !important;
}
}
}
@media screen and (max-width : 1536px) {
@media screen and (max-width: 1536px) {
// table.v-table tbody td.FlexBtn:not(:first-child) {
// padding: 12px 8px;
// }
@@ -331,9 +350,6 @@ td.FlexBtn .theme--light.v-icon {
// }
table.v-table tbody td.Height-SM-48 {
height: 48px;
}
@@ -370,7 +386,7 @@ td.FlexBtn .theme--light.v-icon {
}
@media screen and (max-width : 1366px) {
@media screen and (max-width: 1366px) {
.FlexBtn {
// padding: 10px 8px !important;
padding: 20px 8px !important;
@@ -381,7 +397,7 @@ td.FlexBtn .theme--light.v-icon {
}
}
@media screen and (max-width : 1024px) {
@media screen and (max-width: 1024px) {
.WM-WidthScreen-XS {
flex-basis: 60% !important;
max-width: 60% !important;
+107 -126
View File
@@ -3,114 +3,90 @@
<v-container grid-list-xs fluid>
<material-card color="black" title="Add Cycle">
<v-layout wrap class="px-5 my-3">
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
<v-text-field
name="sterilizer_id"
label="Sterilizer ID"
color="black"
v-model="formData.sterilizer_id"
class="py-3 pr-3"
></v-text-field>
name="sterilizer_id"
label="Sterilizer ID"
color="black"
v-model="formData.sterilizer_id"
class="py-3 pr-3"/>
</v-flex>
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
<v-text-field
name="cycle_number"
label="Cycle Number"
color="black"
v-model="formData.cycle_number"
class="py-3 pr-3"
></v-text-field>
name="cycle_number"
label="Cycle Number"
color="black"
v-model="formData.cycle_number"
class="py-3 pr-3"/>
</v-flex>
<v-flex xs12 sm6 md4 class="WM-FlexCenter">
<v-icon class="far fa-calendar-alt mr-2"></v-icon>
<v-menu
lazy
:close-on-content-click="true"
transition="v-scale-transition"
offset-y
v-model="fromMenuDate"
>
<v-text-field
required
slot="activator"
label="Date"
color="black"
class="pr-3"
v-model="formData.date">
</v-text-field>
<v-date-picker
color="pink"
no-title
v-model="formData.date"
:date-format="date => new Date(date).toDateString()"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs12></v-flex>
<v-flex xs12 sm6 md4 class="WM-FlexCenter WM-DuplicateInput" style="position: relative" v-for="(label, key) in formData.labels" :key="key">
<div class="Inner">
<v-icon class="fa fa-check mr-2 WM-Margin-B-8"></v-icon>
<v-autocomplete
color="black"
:items="labels"
item-text="id"
item-value="id"
v-model="label.id"
label="Select Label For Cycle"
></v-autocomplete>
<!-- <v-text-field
name="labels"
label="Label ID"
color="black"
v-model="label.id"
class="py-3 pr-3"
></v-text-field> -->
<v-btn
absolute
small
right
bottom
color="cyan"
@click="duplicateForm(key)"
>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>ADD
</v-btn>
<v-btn v-if="key > 0"
absolute
small
right
top
color="pink"
@click="removeForm(key)"
>
<v-icon class="white--text mr-2 caption">fas fa-remove</v-icon>REMOVE
</v-btn>
</div>
<v-icon class="far fa-calendar-alt mr-2"/>
<v-menu
lazy
:close-on-content-click="true"
transition="v-scale-transition"
offset-y
v-model="fromMenuDate">
<v-text-field required
slot="activator"
label="Date"
color="black"
class="pr-3"
v-model="formData.date"/>
<v-date-picker
color="pink"
no-title
v-model="formData.date"
:date-format="date => new Date(date).toDateString()"/>
</v-menu>
</v-flex>
<v-spacer></v-spacer>
<v-flex xs12></v-flex>
<v-flex xs12 sm6 md4 class="WM-FlexCenter WM-DuplicateInput" style="position: relative"
v-for="(label, key) in formData.labels" :key="key">
<div class="Inner">
<v-icon class="fa fa-check mr-2 WM-Margin-B-8"></v-icon>
<v-autocomplete
color="black"
:items="labels"
item-text="id"
item-value="id"
v-model="label.id"
label="Select Label For Cycle"/>
<!-- <v-text-field
name="labels"
label="Label ID"
color="black"
v-model="label.id"
class="py-3 pr-3" />-->
<v-btn absolute small right bottom color="cyan" @click="duplicateForm(key)">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
ADD
</v-btn>
<v-btn v-if="key > 0" absolute small right top color="pink" @click="removeForm(key)">
<v-icon class="white--text mr-2 caption">fas fa-remove</v-icon>
REMOVE
</v-btn>
</div>
</v-flex>
<v-spacer/>
<v-flex xs12>
<hr class="v-divider theme--light" style="margin:30px 0 0 0 !important">
</v-flex>
<v-flex xs12 sm12 md12 class="WM-FlexCenter">
<!-- <v-icon class="fa fa-sort-amount-desc mr-2"></v-icon> -->
<v-textarea color="black" v-model="formData.note" class="py-3 pr-3" name="address">
<template v-slot:label>
<div>Description</div>
</template>
</v-textarea>
</v-flex>
<!-- <v-icon class="fa fa-sort-amount-desc mr-2"></v-icon> -->
<v-textarea color="black" v-model="formData.note" class="py-3 pr-3" name="address">
<template v-slot:label>
<div>Description</div>
</template>
</v-textarea>
</v-flex>
</v-layout>
<v-layout row wrap justify-center align-center>
<v-flex xs12 md2 sm2 class="text-md-center text-xs-center">
<v-btn
class="WM-CyanBlueGradient-BG"
style="padding:10px 60px"
@click="submitForm()"
>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">SAVE</span>
</v-btn>
@@ -130,9 +106,10 @@
</template>
<script>
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
import { mapMutations } from "vuex";
import {ApiService} from "@/services";
import {urls} from "@/config/urls";
import {mapMutations} from "vuex";
export default {
data() {
return {
@@ -140,19 +117,19 @@ export default {
formData: {
note: "",
labels: [
{
name:''
}
]
{
name: ''
}
]
},
labels: [],
rules: {
required: value => !!value || "Required.",
counter: value =>
!value ||
value.length == 0 ||
value.length >= 5 ||
"Min 5 characters"
!value ||
value.length == 0 ||
value.length >= 5 ||
"Min 5 characters"
}
};
},
@@ -165,13 +142,13 @@ export default {
methods: {
async load(id) {
const result = await ApiService.get(urls.editCycle(id));
if (result.status == 200) {
if (result && result.status == 200) {
this.formData = result.data.data;
}
},
async loadLabels() {
const result = await ApiService.get(urls.listAllLabel());
if (result.status == 200) {
if (result && result.status == 200) {
this.labels = result.data.data;
}
},
@@ -179,49 +156,53 @@ export default {
let result;
if (this.$route.params.cycle) {
result = await ApiService.put(
urls.updateCycle(this.$route.params.cycle),
this.formData
urls.updateCycle(this.$route.params.cycle),
this.formData
);
} else {
result = await ApiService.post(
urls.storeCycle,
this.formData
urls.storeCycle,
this.formData
);
}
if (result && result.status == 200) {
this.$router.push({ name: "AllCycle" });
this.$router.push({name: "AllCycle"});
}
},
duplicateForm(infoIndex) {
this.formData.labels.push({
name: "",
});
this.formData.labels.push({
name: "",
});
},
removeForm(infoIndex) {
this.formData.labels.splice(infoIndex, 1);
},
},
removeForm(infoIndex) {
this.formData.labels.splice(infoIndex, 1);
},
}
};
</script>
<style>
.v-btn--floating {
padding: 0!important;
padding: 0 !important;
}
.theme--light.v-btn.v-btn--flat {
color: rgba(0,0,0,.87)!important;
color: rgba(0, 0, 0, .87) !important;
}
.v-btn--floating, .v-btn--icon:before {
border-radius: 50%!important;
border-radius: 50% !important;
}
.WM-DuplicateInput {
margin: 15px 0;
margin: 15px 0;
}
.WM-DuplicateInput .Inner {
padding: 15px 20px !important;
margin: 0 10px 0 0;
width: 100%;
border: 1px solid rgba(0,0,0,.2);
padding: 15px 20px !important;
margin: 0 10px 0 0;
width: 100%;
border: 1px solid rgba(0, 0, 0, .2);
}
</style>
+9 -7
View File
@@ -13,7 +13,6 @@
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
@@ -31,7 +30,6 @@
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
@@ -47,7 +45,6 @@
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
@@ -144,6 +141,7 @@ export default {
{
title: `<span>Add A </span><br/><span>Test Result</span>`,
icon: 'fas fa-plus',
// image:'https://cdn.willaspace.com/cssd/static/image/svg/Plus-white.svg',
color: 'black text-white',
route: {name: 'SubmitTestResult'},
aligntext: 'text-md-left',
@@ -176,7 +174,8 @@ export default {
{
title: `<span>Add new </span><br/><span>item</span>`,
icon: 'fas fa-plus',
color: 'blue text-white',
// image:'https://cdn.willaspace.com/cssd/static/image/svg/Plus-white.svg',
color: 'WM-CyanGradient-BG text-white',
route: {name: 'AddItem'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
@@ -208,7 +207,8 @@ export default {
{
title: `<span>Add new </span><br/><span>Package</span>`,
icon: 'fas fa-plus',
color: 'cyan text-white',
// image:'https://cdn.willaspace.com/cssd/static/image/svg/Plus-white.svg',
color: 'WM-DeepBlueGradient-BG text-white',
route: {name: 'AddPackage'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
@@ -230,7 +230,8 @@ export default {
{
title: `<span>Add new </span><br/><span> label</span>`,
icon: 'fas fa-plus',
color: 'purple text-white',
// image:'https://cdn.willaspace.com/cssd/static/image/svg/Plus-white.svg',
color: 'WM-PurpleGradient-BG text-white',
route: {name: 'AddLabel'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
@@ -252,7 +253,8 @@ export default {
{
title: `<span>Add new </span><br/><span>cycle</span>`,
icon: 'fas fa-plus',
color: 'red text-white',
// image:'https://cdn.willaspace.com/cssd/static/image/svg/Plus-white.svg',
color: 'WM-RedGradient-BG text-white',
route: {name: 'AddCycle'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
+9 -47
View File
@@ -155,52 +155,15 @@ import toast from "@/services/global/toast.service";
export default {
data: () => ({
headers: [
// {
// sortable: true,
// text: "ID",
// value: "id"
// },
{
sortable: true,
text: "Item ID",
value: "id"
},
{
sortable: false,
text: "Name",
value: "name"
},
{
sortable: true,
text: "Owner",
value: "User"
},
{
sortable: true,
text: "Hospital",
value: "Hospital"
},
{
sortable: false,
text: "UDI",
value: "udi"
},
{
sortable: false,
text: "Size",
value: "size"
},
{
sortable: false,
text: "Status",
value: "status"
},
{
sortable: false,
text: "Action",
value: "action",
align: "left"
}
// {sortable: true,text: "ID",value: "id"},
{sortable: false, text: "Item ID", value: "id"},
{sortable: false, text: "Name", value: "name"},
{sortable: false, text: "Owner", value: "User"},
{sortable: false, text: "Hospital", value: "Hospital"},
{sortable: false, text: "UDI", value: "udi"},
{sortable: false, text: "Size", value: "size"},
{sortable: false, text: "Status", value: "status"},
{sortable: false, text: "Action", value: "action", align: "left"}
],
filter: {
name: '',
@@ -296,7 +259,6 @@ export default {
}
}
},
async loadMedicalCenters() {
const result = await ApiService.get(urls.listFilterItemsTestResult);
if (result && result.status == 200) {
+4 -10
View File
@@ -129,13 +129,13 @@ export default {
},
async load(id) {
const result = await ApiService.get(urls.editLabel(id));
if (result.status == 200) {
if (result && result.status == 200) {
this.formData = result.data.data;
}
},
async loadItems() {
const result = await ApiService.get(urls.listAllPackage());
if (result.status == 200) {
if (result && result.status == 200) {
this.items = result.data.data;
}
},
@@ -143,15 +143,9 @@ export default {
let result;
this.formData['lot_number'] = this.lotNumber;
if (this.$route.params.label) {
result = await ApiService.put(
urls.updateLabel(this.$route.params.label),
this.formData
);
result = await ApiService.put(urls.updateLabel(this.$route.params.label), this.formData);
} else {
result = await ApiService.post(
urls.storeLabel,
this.formData
);
result = await ApiService.post(urls.storeLabel, this.formData);
}
if (result && result.status == 200) {