fix : style

This commit is contained in:
zeinab.ashrafi
2025-03-13 12:57:07 +03:30
parent 988e3aa5c8
commit 0d9a6f2ae4
21 changed files with 668 additions and 739 deletions
+5 -4
View File
@@ -37,7 +37,7 @@
</v-flex>
<v-spacer/>
<v-flex class xs12 sm6 md6 lg2 xl1>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load()">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -63,12 +63,13 @@
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light">{{ item.id }}</td>
<td class="title font-weight-light">{{ (item.user && item.user.medical_center) ?
item.user.medical_center.name : '' }}</td>
<td class="title font-weight-light">
{{ (item.user && item.user.medical_center) ? item.user.medical_center.name : '' }}
</td>
<td class="title font-weight-light">{{ item.sterilizer_id }}</td>
<td class="title font-weight-light">{{ item.cycle_number }}</td>
<td class="title font-weight-light">{{ item.date }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2"
+2 -2
View File
@@ -29,7 +29,7 @@
<!--btn-->
<v-spacer/>
<v-flex class xs12 sm6 md6 lg2 xl1>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load()">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -64,7 +64,7 @@
<td class="title font-weight-light">{{ item.udi | text_20_letter }}</td>
<td class="title font-weight-light">{{ item.size }}</td>
<td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover v-if="$hasRole('Admin|Supervisor')">
<template v-slot:activator="{ on, attrs }">
<v-btn
+2 -2
View File
@@ -35,7 +35,7 @@
</v-flex>
<v-spacer/>
<v-flex xs12 sm6 md6 lg2 xl1 class="">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load()">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -67,7 +67,7 @@
<td class="title font-weight-light">{{ item.user ? item.user.name : '' }}</td>
<td class="title font-weight-light">{{ item.cycle_number }}</td>
<td class="title font-weight-light">{{ item.sterilizer_id }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2"
+111 -106
View File
@@ -1,118 +1,123 @@
<template>
<v-form ref="form">
<v-container grid-list-xs>
<material-card class color="black" title="Add Medical Center" text>
<v-layout row wrap class="px-5 mb-3">
<v-flex xs12 md3 xs3>
<v-text-field
v-model="medicalCenter.name"
label="Name"
color="black"
class="pa-2"
:rules="[rules.required, rules.counter]"
></v-text-field>
</v-flex>
<v-flex xs12 md3 xs3>
<v-select
:items="cities"
item-text="name_en"
item-value="id"
v-model="medicalCenter.city_id"
label="Select City"
></v-select>
</v-flex>
<v-flex xs12 md3 xs3>
<v-text-field
v-model="medicalCenter.address"
label="Address"
color="black"
class="pa-2"
:rules="[rules.required]"
></v-text-field>
</v-flex>
<v-flex xs12 md3 xs3>
<v-text-field
v-model="medicalCenter.phone_number"
label="Phone Number"
color="black"
class="pa-2"
:rules="[rules.required]"
></v-text-field>
</v-flex>
</v-layout>
<v-layout row wrap align-center justify-center class="mt-3">
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
<template v-if="$route.params.medicalCenter">
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
<span class="white--text">Edit</span>
</template>
<template v-else>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</template>
</v-btn>
<router-link :to="{name:'ManageMedicalCenter'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
</v-btn>
</router-link>
</v-layout>
</material-card>
</v-container>
</v-form>
<v-form ref="form">
<v-container grid-list-xs>
<material-card class color="black" title="Add Medical Center" text>
<v-layout row wrap class="px-5 mb-3">
<v-flex xs12 sm6 md6 lg3>
<v-text-field
v-model="medicalCenter.name"
label="Name"
color="black"
class="pa-2"
:rules="[rules.required, rules.counter]"
/>
</v-flex>
<v-flex xs12 sm6 md6 lg3>
<v-select
:items="cities"
item-text="name_en"
item-value="id"
v-model="medicalCenter.city_id"
label="Select City"
/>
</v-flex>
<v-flex xs12 sm6 md6 lg3>
<v-text-field
v-model="medicalCenter.address"
label="Address"
color="black"
class="pa-2"
:rules="[rules.required]"
/>
</v-flex>
<v-flex xs12 sm6 md6 lg3>
<v-text-field
v-model="medicalCenter.phone_number"
label="Phone Number"
color="black"
class="pa-2"
:rules="[rules.required]"
/>
</v-flex>
</v-layout>
<v-layout row wrap align-center justify-center class="mt-3">
<v-flex xs12 sm6 md6 lg3 class="text-center">
<router-link :to="{name:'ManageMedicalCenter'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
</v-btn>
</router-link>
</v-flex>
<v-flex xs12 sm6 md6 lg3 class="text-center">
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
<template v-if="$route.params.medicalCenter">
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
<span class="white--text">Edit</span>
</template>
<template v-else>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</template>
</v-btn>
</v-flex>
</v-layout>
</material-card>
</v-container>
</v-form>
</template>
<script>
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
import {ApiService} from "@/services";
import {urls} from "@/config/urls";
export default {
data() {
return {
medicalCenter: {
name: "",
address : "",
city_id : "",
phone_number : ""
},
rules: {
required: value => !!value || "Required.",
counter: value => value.length <= 30 || "Max 30 characters"
data() {
return {
medicalCenter: {
name: "",
address: "",
city_id: "",
phone_number: ""
},
rules: {
required: value => !!value || "Required.",
counter: value => value.length <= 30 || "Max 30 characters"
},
cities: []
};
},
cities : []
};
},
created() {
if (this.$route.params.medicalCenter) {
this.load(this.$route.params.medicalCenter);
}
this.loadCities();
},
methods: {
async load(id) {
const result = await ApiService.get(urls.editMedicalCenter(id));
if (result && result.status == 200) {
this.medicalCenter = result.data.data;
}
},
async loadCities() {
const result = await ApiService.get(urls.allCities);
if (result.status == 200) {
this.cities = result.data.data;
}
},
async AddMedicalCenter() {
if (this.$refs.form.validate()) {
created() {
if (this.$route.params.medicalCenter) {
var result = await ApiService.put(urls.updateMedicalCenter(this.$route.params.medicalCenter), this.medicalCenter);
} else {
var result = await ApiService.post(urls.storeMedicalCenter, this.medicalCenter);
this.load(this.$route.params.medicalCenter);
}
if (result && result.status == 200) {
this.$router.push({name : "ManageMedicalCenter"});
this.loadCities();
},
methods: {
async load(id) {
const result = await ApiService.get(urls.editMedicalCenter(id));
if (result && result.status == 200) {
this.medicalCenter = result.data.data;
}
},
async loadCities() {
const result = await ApiService.get(urls.allCities);
if (result.status == 200) {
this.cities = result.data.data;
}
},
async AddMedicalCenter() {
if (this.$refs.form.validate()) {
if (this.$route.params.medicalCenter) {
var result = await ApiService.put(urls.updateMedicalCenter(this.$route.params.medicalCenter), this.medicalCenter);
} else {
var result = await ApiService.post(urls.storeMedicalCenter, this.medicalCenter);
}
if (result && result.status == 200) {
this.$router.push({name: "ManageMedicalCenter"});
}
}
}
}
}
}
};
</script>
<style lang="scss" scoped>
+4 -4
View File
@@ -7,7 +7,7 @@
</v-flex>
<v-spacer/>
<v-flex class xs12 sm6 md6 lg2 xl1>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load()">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -22,7 +22,7 @@
</v-flex>
</v-layout>
<v-layout class="px-4 my-3">
<v-divider></v-divider>
<v-divider/>
</v-layout>
<v-layout align-center justify-center wrap class="px-5 mt-3">
<v-flex md12>
@@ -34,7 +34,7 @@
<td class="headline font-weight-light WM-NoLetterSpacing">{{ item.name }}</td>
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="title font-weight-light">{{ item.users_count }} Operator</td>
<td class="text-xs-right FlexBtn Height-MD-80 Height-SM-48">
<td class="text-xs-right FlexBtn Height-MD-80 Height-SM-48 justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<router-link class="LinkBtn"
@@ -72,7 +72,7 @@
</v-data-table>
</v-flex>
</v-layout>
<v-divider></v-divider>
<v-divider/>
<div class="text-xs-center mt-2" v-if="lastPage > 1">
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
</div>
+2 -2
View File
@@ -12,7 +12,7 @@
<v-select :items="roles" name="roles" v-model="filter.role" label="Roles" class="pa-2" color="black"></v-select>
</v-flex>
<v-flex xs12 md2 sm2 class="text-xs-right">
<v-btn class="WM-CyanBlueGradient-BG" @click="load" style="padding:9px 30px">
<v-btn class="WM-CyanBlueGradient-BG" @click="load" style="padding:10px 30px">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -43,7 +43,7 @@
</td>
<td class="title font-weight-light">{{ item.cell_number }}</td>
<td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right">
<td class="text-xs-right justify-self-end">
<v-btn
:color="item.status == 'Active' ? 'red' : 'green'"
@click="changeStatus(item.id)"
+1 -1
View File
@@ -56,7 +56,7 @@
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.udi }}</td>
<td class="title font-weight-light">{{ item.size }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2" @click="show(item.id)">
+1 -1
View File
@@ -56,7 +56,7 @@
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.udi }}</td>
<td class="title font-weight-light">{{ item.size }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2" @click="show(item.id)">
+5 -6
View File
@@ -19,7 +19,7 @@
:clearable="true"/>
</v-flex>
<!-- <v-flex class xs12 md2 sm3>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load()">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -28,7 +28,7 @@
<!-- <v-spacer></v-spacer> -->
<v-spacer/>
<v-flex class xs12 sm6 md6 lg2 xl1>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load()">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -60,14 +60,13 @@
<td class="title font-weight-light">
{{ (item.user && item.user.medical_center) ? item.user.medical_center.name : '' }}
</td>
<td class="title font-weight-light">{{
item.user ? item.user.name : '' | text_20_letter
}}
<td class="title font-weight-light">
{{item.user ? item.user.name : '' | text_20_letter}}
</td>
<td class="title font-weight-light">{{ item.udi | text_20_letter }}</td>
<td class="title font-weight-light">{{ item.description }}</td>
<td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover v-if="$hasRole('Admin|Supervisor')">
<template v-slot:activator="{ on, attrs }">
<v-btn :color="!['suspended', 'rejected'].includes(item.status) ? 'red' : 'green'"
+3 -3
View File
@@ -53,7 +53,7 @@
<v-spacer/>
<v-spacer/>
<v-flex class xs12 sm6 md6 lg2 xl1>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load(null, null)">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load(null, null)">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -69,7 +69,7 @@
</v-layout>
<!--<v-layout wrap class="px-5 mb-3 my-3">
<v-flex class xs12 md3 sm3 class="WM-XL-Align-L text-lg-left">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load(null, null)">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load(null, null)">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -113,7 +113,7 @@
</span>
<!-- {{ item.verified }} -->
</td>
<td class="text-xs-right FlexBtn">
<td class="text-xs-right FlexBtn justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn color="cyan" class="mr-2" @click="show(item.id)" v-bind="attrs"
+255 -352
View File
@@ -3,30 +3,30 @@
<v-container grid-list-xs>
<material-card color="black" title="Add a New Test" class>
<v-layout row wrap class="ma-2">
<v-flex xs12 md3 sm3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-flex xs12 md3 sm3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-text-field
name="name"
v-model="form.name"
label="Name"
color="black"
class="py-3 pr-3"
:rules="[rules.required]"
></v-text-field>
name="name"
v-model="form.name"
label="Name"
color="black"
class="py-3 pr-3"
:rules="[rules.required]"
/>
</v-flex>
<v-flex xs12 md3 sm3 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
:rules="[rules.required]"
name="uniquecode"
v-model="form.unique_code"
label="Unique Code"
color="black"
class="py-3 pr-3"
></v-text-field>
:rules="[rules.required]"
name="uniquecode"
v-model="form.unique_code"
label="Unique Code"
color="black"
class="py-3 pr-3"
/>
</v-flex>
<!-- <v-flex xs12 md3 sm3 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-autocomplete
:rules="[rules.required]"
:items="deviceLabels"
@@ -36,341 +36,238 @@
label="ID Label"
color="black"
class="py-3 pr-3"
></v-autocomplete>
/>
</v-flex> -->
</v-layout>
<v-layout
row
wrap
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Relative"
:key="keyForm"
v-for="(info, keyForm) in form.info"
>
<v-layout row wrap class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Relative"
:key="keyForm" v-for="(info, keyForm) in form.info">
<v-layout row wrap class="ma-2 WM-Width-Full">
<v-flex xs12 md3 sm3>
<v-text-field
name="inputname"
v-model="info.name"
label="Input Name"
color="black"
class="pa-2"
:rules="[rules.required]"
prepend-icon="fa fa-align-left"
></v-text-field>
name="inputname"
v-model="info.name"
label="Input Name"
color="black"
class="pa-2"
:rules="[rules.required]"
prepend-icon="fa fa-align-left"
/>
</v-flex>
<v-flex xs12 md3 sm3>
<v-select
:items="type"
item-text="state"
item-value="abbr"
label="Type"
v-bind="info.id !== 0 ? {disabled: true} : {disabled: false}"
v-model="info.type"
single-line
color="black"
class="pa-2"
prepend-icon="fa fa-filter"
@change="changeType(keyForm, info.type)"
></v-select>
:items="type"
item-text="state"
item-value="abbr"
label="Type"
v-bind="info.id !== 0 ? {disabled: true} : {disabled: false}"
v-model="info.type"
single-line
color="black"
class="pa-2"
prepend-icon="fa fa-filter"
@change="changeType(keyForm, info.type)"
/>
</v-flex>
<!-- Text Input Section -->
<v-flex xs12 md3 sm3>
<v-select
:items="size"
item-text="state"
item-value="abbr"
label="Size"
v-model="info.size"
v-if="info.type !== 'Form'"
single-line
color="black"
class="pa-2"
prepend-icon="fa fa-sort-numeric-asc"
></v-select>
:items="size"
item-text="state"
item-value="abbr"
label="Size"
v-model="info.size"
v-if="info.type !== 'Form'"
single-line
color="black"
class="pa-2"
prepend-icon="fa fa-sort-numeric-asc"
/>
</v-flex>
<v-flex xs12 md3 sm3 v-if="info.type == 'Text'">
<v-layout row wrap>
<v-flex xs12 class="WM-FlexWrap ml-3">
<v-checkbox
label="require barcode scanner"
v-model="info.require_scanner"
></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<v-layout row wrap>
<v-flex xs12 class="WM-FlexWrap ml-3">
<v-checkbox
label="require barcode scanner"
v-model="info.require_scanner"
/>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<!-- SelectBox Section -->
<v-layout
class="ma-3 pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full"
row
wrap
v-if="info.type === 'Select' || info.type === 'Checkbox' || info.type === 'Radiobutton'"
>
<v-layout
row
wrap
class="WM-Relative WM-Width-Full"
v-if="info['options'].length > 0"
>
<v-flex
xs12
md3
sm3
v-for="(selectbox , keySelect) in info['options']"
:key="keySelect"
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative"
>
<v-layout class="ma-3 pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" row wrap
v-if="info.type === 'Select' || info.type === 'Checkbox' || info.type === 'Radiobutton'">
<v-layout row wrap class="WM-Relative WM-Width-Full"
v-if="info['options'].length > 0">
<v-flex xs12 md3 sm3 v-for="(selectbox , keySelect) in info['options']" :key="keySelect"
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
:rules="[rules.required]"
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="selectbox.title"
prepend-icon="fa fa-align-left"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
v-if="keySelect >= 1"
@click="removeSelectbox(keyForm, keySelect)"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>REMOVE
:rules="[rules.required]"
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="selectbox.title"
prepend-icon="fa fa-align-left"
/>
<v-btn absolute small right bottom color="pink" v-if="keySelect >= 1"
@click="removeSelectbox(keyForm, keySelect)">
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE
</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="addSelectbox(keyForm)"
color="black"
class="mb-2"
>
<v-btn absolute right bottom small @click="addSelectbox(keyForm)"
color="black"
class="mb-2">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<v-layout
class="ma-3 pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full"
row
wrap
v-if="info.type === 'Range'"
>
<v-layout
row
wrap
class="WM-Relative WM-Width-Full"
>
<v-flex
xs12
md3
sm3
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative"
>
<v-layout class="ma-3 pa-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full" row wrap
v-if="info.type === 'Range'">
<v-layout row wrap class="WM-Relative WM-Width-Full">
<v-flex xs12 md3 sm3
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
:rules="[rules.required]"
name="from"
label="From"
color="black"
class="pa-2 Input"
v-model="info['options'][0].title"
prepend-icon="fa fa-angle-right"
></v-text-field>
:rules="[rules.required]"
name="from"
label="From"
color="black"
class="pa-2 Input"
v-model="info['options'][0].title"
prepend-icon="fa fa-angle-right"
/>
</v-flex>
<v-flex
xs12
md3
sm3
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative"
xs12
md3
sm3
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative"
>
<v-text-field
:rules="[rules.required]"
name="to"
label="To"
color="black"
class="pa-2 Input"
v-model="info['options'][1].title"
prepend-icon="fa fa-angle-right"
></v-text-field>
:rules="[rules.required]"
name="to"
label="To"
color="black"
class="pa-2 Input"
v-model="info['options'][1].title"
prepend-icon="fa fa-angle-right"
/>
</v-flex>
</v-layout>
</v-layout>
<!-- Form Section -->
<v-layout
row
wrap
v-if="info.type === 'Form'"
class="pa-3 my-4 mx-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full"
>
<v-layout
row
wrap
v-for="(children , keychildren) in info.children"
:key="keychildren"
class="pa-3 my-4 mx-3 WM-Border WM-Border-Gray WM-Color-LightGrey WM-Width-Full WM-Relative Form"
>
v-if="info.type === 'Form'"
class="pa-3 my-4 mx-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full"
>
<v-layout row wrap v-for="(children , keychildren) in info.children" :key="keychildren"
class="pa-3 my-4 mx-3 WM-Border WM-Border-Gray WM-Color-LightGrey WM-Width-Full WM-Relative Form">
<v-flex xs12 md3 sm3>
<v-text-field
:rules="[rules.required]"
name="name"
v-model="children.name"
label="Input Name"
color="black"
class="pa-2"
prepend-icon="fa fa-align-left"
></v-text-field>
:rules="[rules.required]"
name="name"
v-model="children.name"
label="Input Name"
color="black"
class="pa-2"
prepend-icon="fa fa-align-left"
/>
</v-flex>
<v-flex xs12 md3 sm3>
<v-select
:items="type"
item-text="state"
item-value="abbr"
label="Type"
v-model="children.type"
v-bind="children.id !== 0 ? {disabled: true} : {disabled: false}"
single-line
color="black"
class="pa-2"
@change="changeTypeForm(keyForm, children.type, keychildren)"
prepend-icon="fa fa-filter"
></v-select>
:items="type"
item-text="state"
item-value="abbr"
label="Type"
v-model="children.type"
v-bind="children.id !== 0 ? {disabled: true} : {disabled: false}"
single-line
color="black"
class="pa-2"
@change="changeTypeForm(keyForm, children.type, keychildren)"
prepend-icon="fa fa-filter"
/>
</v-flex>
<v-flex xs12 md3 sm3>
<v-select
:items="size"
item-text="state"
item-value="abbr"
label="Size"
v-if="children.type !== 'Form'"
v-model="children.size"
single-line
color="black"
class="pa-2"
prepend-icon="fa fa-sort-numeric-asc"
></v-select>
:items="size"
item-text="state"
item-value="abbr"
label="Size"
v-if="children.type !== 'Form'"
v-model="children.size"
single-line
color="black"
class="pa-2"
prepend-icon="fa fa-sort-numeric-asc"
/>
</v-flex>
<v-flex xs12 md3 sm3 v-if="children.type == 'Text'">
<v-layout row wrap>
<v-flex xs12 class="WM-FlexWrap ml-3">
<v-checkbox
label="require barcode scanner"
v-model="children.require_scanner"
></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<v-layout row wrap>
<v-flex xs12 class="WM-FlexWrap ml-3">
<v-checkbox
label="require barcode scanner"
v-model="children.require_scanner"
/>
</v-flex>
</v-layout>
</v-flex>
<!-- Inner Form Selectbox Section -->
<v-layout
row
wrap
class="pa-3 mb-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full"
v-if="children.type === 'Select' || children.type === 'Checkbox' || children.type === 'Radiobutton'"
>
<v-layout
row
wrap
class="WM-Relative WM-Width-Full"
v-if="children['options'].length > 0"
>
<v-flex
xs12
md3
sm3
v-for="(selectbox , keySelect) in children['options']"
:key="keySelect"
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative"
>
<v-layout row wrap class="pa-3 mb-3 WM-Border WM-Border-Black WM-Relative WM-Width-Full"
v-if="children.type === 'Select' || children.type === 'Checkbox' || children.type === 'Radiobutton'">
<v-layout row wrap class="WM-Relative WM-Width-Full"
v-if="children['options'].length > 0">
<v-flex xs12 md3 sm3 v-for="(selectbox , keySelect) in children['options']"
:key="keySelect"
class="pb-4 ma-2 WM-Border WM-Border-Gray WM-BG-White WM-Width-Full WM-Relative">
<v-text-field
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="selectbox.title"
:rules="[rules.required]"
prepend-icon="fa fa-align-left"
></v-text-field>
<v-btn
absolute
small
right
bottom
color="pink"
@click="removeSelectboxForm(keyForm, keySelect, keychildren)"
v-if="keySelect >= 1"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>REMOVE
name="title"
label="Title"
color="black"
class="pa-2 Input"
v-model="selectbox.title"
:rules="[rules.required]"
prepend-icon="fa fa-align-left"
/>
<v-btn absolute small right bottom color="pink"
@click="removeSelectboxForm(keyForm, keySelect, keychildren)"
v-if="keySelect >= 1">
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE
</v-btn>
</v-flex>
</v-layout>
<v-btn
absolute
right
bottom
small
@click="addSelectboxForm(keyForm, keychildren)"
color="black"
>
<v-btn absolute right bottom small
@click="addSelectboxForm(keyForm, keychildren)" color="black">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
</v-layout>
<v-btn
absolute
small
right
top
color="pink"
@click="removeForm(keyForm, keychildren)"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>REMOVE
<v-btn absolute small right top color="pink"
@click="removeForm(keyForm, keychildren)">
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE
</v-btn>
</v-layout>
<v-btn
absolute
small
right
bottom
color="cyan"
@click="duplicateForm(keyForm)"
>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>ADD
<v-btn absolute small right bottom color="cyan"
@click="duplicateForm(keyForm)">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
ADD
</v-btn>
</v-layout>
<v-btn
v-if="keyForm > 0 || form.info.length > 1"
absolute
small
right
top
color="pink"
@click="removeInput(keyForm)"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>REMOVE
<v-btn v-if="keyForm > 0 || form.info.length > 1" absolute small right top color="pink"
@click="removeInput(keyForm)">
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
REMOVE
</v-btn>
<v-layout
row
wrap
align-center
justify-center
class="mt-4"
v-if="(form.info.length -1) == keyForm"
>
<v-btn
absolute
right
bottom
small
@click="addInput"
color="pink"
class="mb-2"
>
<v-layout row wrap align-center justify-center class="mt-4" v-if="(form.info.length -1) == keyForm">
<v-btn absolute right bottom small @click="addInput" color="pink" class="mb-2">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span class="white--text">Add</span>
</v-btn>
@@ -378,28 +275,31 @@
</v-layout>
<v-layout row wrap align-center justify-center class="mt-4">
<v-btn
class="WM-CyanBlueGradient-BG"
style="padding:10px 60px"
@click="registerForm"
>
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">Generate Form</span>
</v-btn>
<router-link :to="{name : 'ListTestType'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
<v-flex xs12 sm6 md6 lg3 class="text-center">
<router-link :to="{name : 'ListTestType'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
</v-btn>
</router-link>
</v-flex>
<v-flex xs12 sm6 md6 lg3 class="text-center">
<v-btn class="WM-CyanBlueGradient-BG"
style="padding:10px 60px"
@click="registerForm">
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">Generate Form</span>
</v-btn>
</router-link>
</v-flex>
</v-layout>
</material-card>
</v-container>
</v-form>
</template>
<script>
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
import {ApiService} from "@/services";
import {urls} from "@/config/urls";
export default {
data() {
return {
@@ -417,43 +317,43 @@ export default {
]
},
type: [
{ state: "Text", abbr: "Text" },
{ state: "Checkbox", abbr: "Checkbox" },
{ state: "Select", abbr: "Select" },
{ state: "Radiobutton", abbr: "Radiobutton" },
{ state: "Switch", abbr: "Switch" },
{ state: "Range", abbr: "Range" },
{ state: "Time", abbr: "Time" },
{ state: "Temperature", abbr: "Temperature" },
{ state: "Pressure", abbr: "Pressure" },
{ state: "Form", abbr: "Form" },
{state: "Text", abbr: "Text"},
{state: "Checkbox", abbr: "Checkbox"},
{state: "Select", abbr: "Select"},
{state: "Radiobutton", abbr: "Radiobutton"},
{state: "Switch", abbr: "Switch"},
{state: "Range", abbr: "Range"},
{state: "Time", abbr: "Time"},
{state: "Temperature", abbr: "Temperature"},
{state: "Pressure", abbr: "Pressure"},
{state: "Form", abbr: "Form"},
],
size: [
{ state: "not Selected", abbr: "" },
{ state: "2 from 12", abbr: "md2 sm4 xs12" },
{ state: "3 from 12", abbr: "md3 sm6 xs12" },
{ state: "4 from 12", abbr: "md4 sm4 xs12" },
{ state: "6 from 12", abbr: "md6 sm12 xs12" },
{ state: "8 from 12", abbr: "md8 sm8 xs12" },
{ state: "10 from 12", abbr: "md10 sm10 xs12" },
{ state: "12 from 12", abbr: "md12 sm12 xs12" }
{state: "not Selected", abbr: ""},
{state: "2 from 12", abbr: "md2 sm4 xs12"},
{state: "3 from 12", abbr: "md3 sm6 xs12"},
{state: "4 from 12", abbr: "md4 sm4 xs12"},
{state: "6 from 12", abbr: "md6 sm12 xs12"},
{state: "8 from 12", abbr: "md8 sm8 xs12"},
{state: "10 from 12", abbr: "md10 sm10 xs12"},
{state: "12 from 12", abbr: "md12 sm12 xs12"}
],
rules: {
required: value => !!value || "Required."
},
deviceLabels: [
{ name: "Washer ID", id: "WasherID" },
{ name: "Autoclave ID", id: "AutoclaveID" },
{ name: "Sterilizer ID", id: "SterilizerID" },
{ name: "WasherMachine ID", id: "WasherMachineID" },
{ name: "SealMachine ID", id: "SealMachineID" },
{ name: "Patient ID", id: "PatientID" },
{ name: "Set/Pack ID", id: "Set/PackID" },
{ name: "MD ID", id: "MDID" },
{ name: "OR ID", id: "ORID" },
{ name: "Personal ID", id: "PersonalID" },
{ name: "Instrument ID", id: "InstrumentID" },
{ name: "ID", id: "ID" },
{name: "Washer ID", id: "WasherID"},
{name: "Autoclave ID", id: "AutoclaveID"},
{name: "Sterilizer ID", id: "SterilizerID"},
{name: "WasherMachine ID", id: "WasherMachineID"},
{name: "SealMachine ID", id: "SealMachineID"},
{name: "Patient ID", id: "PatientID"},
{name: "Set/Pack ID", id: "Set/PackID"},
{name: "MD ID", id: "MDID"},
{name: "OR ID", id: "ORID"},
{name: "Personal ID", id: "PersonalID"},
{name: "Instrument ID", id: "InstrumentID"},
{name: "ID", id: "ID"},
]
};
},
@@ -468,15 +368,15 @@ export default {
// //--add checkbox
// }
if (selectedboxType == "Select" || selectedboxType == "Checkbox" || selectedboxType == "Radiobutton") {
this.form.info[infoIndex]["options"] = [{ id: 0, title: "" }];
} else if(selectedboxType == "Range") {
this.form.info[infoIndex]["options"] = [{ id: 0, title: ""}, { id: 0, title: ""}];
this.form.info[infoIndex]["options"] = [{id: 0, title: ""}];
} else if (selectedboxType == "Range") {
this.form.info[infoIndex]["options"] = [{id: 0, title: ""}, {id: 0, title: ""}];
} else {
this.form.info[infoIndex]["options"] = [];
}
if (selectedboxType == "Form") {
this.form.info[infoIndex]["children"] = [
{ id: 0, name: "", type: "", size: "" }
{id: 0, name: "", type: "", size: ""}
];
}
},
@@ -489,26 +389,26 @@ export default {
addSelectbox(infoIndex) {
let form = this.form;
this.form = [];
form.info[infoIndex]["options"].push({ id: 0, title: "" });
form.info[infoIndex]["options"].push({id: 0, title: ""});
this.form = form;
},
addInput() {
this.form.info.push({ id: 0, name: "", type: "", size: "" });
this.form.info.push({id: 0, name: "", type: "", size: ""});
},
changeTypeForm(infoIndex, type, formLevel) {
if (type == "Select" || type == "Checkbox" || type == "Radiobutton") {
let form = this.form;
this.form = "";
form.info[infoIndex]["children"][formLevel]["options"] = [
{ id: 0, title: "" }
{id: 0, title: ""}
];
this.form = form;
} else if(type == "Range") {
} else if (type == "Range") {
let form = this.form;
this.form = "";
form.info[infoIndex]["children"][formLevel]["options"] = [
{ id: 0, title: "" },
{ id: 0, title: "" },
{id: 0, title: ""},
{id: 0, title: ""},
];
this.form = form;
} else {
@@ -522,8 +422,8 @@ export default {
let form = this.form;
this.form = [];
form.info[infoIndex]["children"][formLevel]["options"].splice(
selectboxOptions,
1
selectboxOptions,
1
);
this.form = form;
},
@@ -564,13 +464,13 @@ export default {
let result = null;
if (this.$route.params.testType) {
result = await ApiService.put(
urls.updateTestType(this.$route.params.testType),
this.form
urls.updateTestType(this.$route.params.testType),
this.form
);
} else {
result = await ApiService.post(
urls.storeTestType,
this.form
urls.storeTestType,
this.form
);
}
// if (result && result.status == 200) {
@@ -591,12 +491,15 @@ export default {
.WM-Border-Gray {
border-color: #aaa !important;
}
.WM-Color-LightGrey {
background-color: #f5f5f5;
}
.v-btn--top.v-btn--absolute.v-btn--small {
top: -25px !important;
}
.v-btn--bottom.v-btn--absolute.v-btn--small {
bottom: -24px !important;
}
+2 -2
View File
@@ -59,7 +59,7 @@
<v-spacer/>
<v-flex class xs12 sm6 md6 lg2 xl1>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load(undefined)">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load(undefined)">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -87,7 +87,7 @@
<td class="title font-weight-light">{{ item.unique_code }}</td>
<td class="title font-weight-light">{{ item.user.name }}</td>
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="text-xs-right FlexBtn">
<td class="text-xs-right FlexBtn justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<router-link
+2 -4
View File
@@ -33,12 +33,10 @@
</td>
<td class="title font-weight-light">
<span class="Chip">
<span
class="Unread Content"
>{{ item.unread_messages_count }} unread</span>
<span class="Unread Content">{{ item.unread_messages_count }} unread</span>
</span>
</td>
<td class="text-xs-left FlexBtn">
<td class="text-xs-left FlexBtn justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn
+3 -3
View File
@@ -46,7 +46,7 @@
</v-flex>
<v-spacer/>
<v-flex wrap xs12 sm12 class="WM-Align-R ml-4">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:9px 30px" @click="load(undefined)">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load(undefined)">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn>
@@ -73,7 +73,7 @@
<span v-for="(role, key) in item.roles" :key="key">{{ role.name }}</span>
</td>
<td class="title font-weight-light">{{ item.medical_center.name }}</td>
<td class="text-xs-right FlexBtn">
<td class="text-xs-right FlexBtn justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on"
@@ -194,6 +194,7 @@ export default {
this.load();
},
methods: {
...mapMutations("modal", ["changeCurrentModal", "closeModal"]),
async load(page = 1) {
let filter = "?";
for (const key in this.filter) {
@@ -223,7 +224,6 @@ export default {
this.$router.push({name: `Dashboard`});
}
},
...mapMutations("modal", ["changeCurrentModal", "closeModal"]),
changeRoleModal(user) {
this.changeCurrentModal({
modal: "modal-user-role",