UI/UX + syntax fix

This commit is contained in:
Dillon Ngo
2025-05-13 02:45:40 +08:00
parent 18bd36217b
commit a1eebe7f65
2 changed files with 27 additions and 19 deletions
@@ -1,6 +1,6 @@
<template>
<div class="row align-items-center">
<div class="col">
<div class="col-4">
<div class="row align-items-center">
<div class="col-auto p-r-0">
<div class="bg-master-lighter b-rad-lg padding-10">
@@ -57,8 +57,24 @@
</div>
</div>
</div>
<hr class="my-1" v-if="item.segments && item.segments.length > 0" />
<div class="row align-items-center">
<div class="col">
<div class="row no-margin">
<div class="col-auto no-padding m-r-10 m-t-5 parentContainer" v-for="segment in item.segments" v-bind:key="segment.id" v-if="segment.id !== 1">
<div class="font-heading fs-10 lh-20 p-l-10 p-r-10 bg-master-lightest btn-rounded">
{{segment.name}}
<i class="fa fa-times muted m-l-10 pointer requestModal" data-type="detachSegment" ></i>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="detachSegment">
<detach-segment-form-component :data="segment" :company_id="item.id" :connection="item.company_module.connections[0].id" section="customerProfileSection"></detach-segment-form-component>
</modal-component>
</div>
</div>
</div>
</div>
</div>
<div class="col-auto">
<div class="col-1">
<div class="row align-items-center parentContainer">
<div class="col-auto padding-5 b-a b-grey b-rad-lg pointer m-r-15" @click="hrefPaymenBillingPage">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
@@ -72,19 +88,6 @@
viewBox="0 0 172 172"
style=" fill:#000000;"><defs><linearGradient x1="86" y1="97.08594" x2="86" y2="105.31775" gradientUnits="userSpaceOnUse" id="color-1_43991_gr1"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="94.0625" y1="85.83338" x2="94.0625" y2="93.89588" gradientUnits="userSpaceOnUse" id="color-2_43991_gr2"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="77.9375" y1="85.83338" x2="77.9375" y2="93.89588" gradientUnits="userSpaceOnUse" id="color-3_43991_gr3"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="86" y1="28.55469" x2="86" y2="143.10938" gradientUnits="userSpaceOnUse" id="color-4_43991_gr4"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g><path d="M77.9375,96.75c0,4.45319 3.60931,8.0625 8.0625,8.0625c4.45319,0 8.0625,-3.60931 8.0625,-8.0625z" fill="url(#color-1_43991_gr1)"></path><path d="M94.0625,86c-2.2264,0 -4.03125,1.80485 -4.03125,4.03125c0,2.2264 1.80485,4.03125 4.03125,4.03125c2.2264,0 4.03125,-1.80485 4.03125,-4.03125c0,-2.2264 -1.80485,-4.03125 -4.03125,-4.03125z" fill="url(#color-2_43991_gr2)"></path><path d="M77.9375,86c-2.2264,0 -4.03125,1.80485 -4.03125,4.03125c0,2.2264 1.80485,4.03125 4.03125,4.03125c2.2264,0 4.03125,-1.80485 4.03125,-4.03125c0,-2.2264 -1.80485,-4.03125 -4.03125,-4.03125z" fill="url(#color-3_43991_gr3)"></path><path d="M147.8125,51.0625h-18.8125v-8.0625c0,-4.44512 -3.61738,-8.0625 -8.0625,-8.0625h-11.2445c-1.11263,-3.12019 -4.06888,-5.375 -7.568,-5.375h-32.25c-3.49912,0 -6.45538,2.25481 -7.568,5.375h-11.2445c-4.44512,0 -8.0625,3.61738 -8.0625,8.0625v8.0625h-18.8125c-4.44513,0 -8.0625,3.61738 -8.0625,8.0625v59.125c0,4.44512 3.61737,8.0625 8.0625,8.0625h18.8125v8.0625c0,4.44512 3.61738,8.0625 8.0625,8.0625h69.875c4.44512,0 8.0625,-3.61738 8.0625,-8.0625v-8.0625h18.8125c4.44512,0 8.0625,-3.61738 8.0625,-8.0625v-59.125c0,-4.44512 -3.61737,-8.0625 -8.0625,-8.0625zM147.8125,56.4375c1.4835,0 2.6875,1.20669 2.6875,2.6875v51.0625h-2.88637c-0.80625,-6.09525 -4.28119,-11.78469 -9.47612,-15.25425c0.99437,-1.87319 1.6125,-3.98019 1.6125,-6.24575v-5.375c0,-6.48763 -4.62519,-11.91638 -10.75,-13.16606v-13.70894zM134.375,88.6875c0,3.49912 -2.25213,6.45538 -5.375,7.568v-20.50831c3.12287,1.11262 5.375,4.06887 5.375,7.568zM134.6545,99.1365c3.913,2.48056 6.62469,6.84506 7.47125,11.051h-13.12575v-8.33394c2.12044,-0.43269 4.02319,-1.41094 5.6545,-2.71706zM67.1875,37.625c0,-1.48081 1.204,-2.6875 2.6875,-2.6875h32.25c1.4835,0 2.6875,1.20669 2.6875,2.6875v2.6875c0,1.48081 -1.204,2.6875 -2.6875,2.6875h-32.25c-1.4835,0 -2.6875,-1.20669 -2.6875,-2.6875zM51.0625,40.3125h10.75c0,4.44512 3.61737,8.0625 8.0625,8.0625h32.25c4.44512,0 8.0625,-3.61738 8.0625,-8.0625h10.75c1.4835,0 2.6875,1.20669 2.6875,2.6875v83.3125h-3.34056c-1.73881,-9.23963 -7.19444,-17.45531 -15.06344,-22.66906c1.44319,-2.88906 2.279,-6.13556 2.279,-9.58094v-10.75c0,-11.85456 -9.64544,-21.5 -21.5,-21.5c-11.85456,0 -21.5,9.64544 -21.5,21.5v10.75c0,3.44537 0.83581,6.69188 2.28169,9.58094c-7.869,5.21375 -13.32463,13.42675 -15.06344,22.66906h-3.34325v-83.3125c0,-1.48081 1.204,-2.6875 2.6875,-2.6875zM102.125,94.0625c0,8.89294 -7.23206,16.125 -16.125,16.125c-8.89294,0 -16.125,-7.23206 -16.125,-16.125v-10.75c0,-8.89294 7.23206,-16.125 16.125,-16.125c8.89294,0 16.125,7.23206 16.125,16.125zM86,115.5625c6.48494,0 12.29531,-2.89981 16.24056,-7.45513c6.39088,4.22744 10.93006,10.77956 12.59363,18.20513h-57.66837c1.66356,-7.42556 6.20275,-13.97769 12.59631,-18.20244c3.94256,4.55531 9.75294,7.45244 16.23787,7.45244zM43,96.2555c-3.12288,-1.11263 -5.375,-4.06888 -5.375,-7.568v-5.375c0,-3.49912 2.25212,-6.45538 5.375,-7.568zM37.32669,99.12306c1.634,1.31419 3.54481,2.29512 5.67331,2.7305v8.33394h-13.18487c0.78475,-4.57412 3.526,-8.63225 7.51156,-11.06444zM24.1875,56.4375h18.8125v13.70894c-6.12481,1.24969 -10.75,6.67575 -10.75,13.16606v5.375c0,2.26287 0.61544,4.36719 1.60981,6.24038c-5.21106,3.44806 -8.686,9.05688 -9.47613,15.25963h-2.88369v-51.0625c0,-1.48081 1.204,-2.6875 2.6875,-2.6875zM24.1875,120.9375c-1.4835,0 -2.6875,-1.20669 -2.6875,-2.6875v-2.6875h21.5v5.375zM120.9375,137.0625h-69.875c-1.4835,0 -2.6875,-1.20669 -2.6875,-2.6875v-2.6875h75.25v2.6875c0,1.48081 -1.204,2.6875 -2.6875,2.6875zM147.8125,120.9375h-18.8125v-5.375h21.5v2.6875c0,1.48081 -1.204,2.6875 -2.6875,2.6875z" fill="url(#color-4_43991_gr4)"></path></g></g></svg>
</div>
<div class="col">
<div class="row no-margin">
<div class="col-auto no-padding m-r-10 m-b-5 m-t-5 parentContainer" v-for="segment in item.segments" v-bind:key="segment.id" v-if="segment.id !== 1">
<div class="font-heading fs-10 lh-20 p-l-10 p-r-10 bg-master-lightest btn-rounded">
{{segment.name}}
<i class="fa fa-times muted m-l-10 pointer requestModal" data-type="detachSegment" ></i>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="detachSegment">
<detach-segment-form-component :data="segment" :company_id="item.id" :connection="item.company_module.connections[0].id" section="customerProfileSection"></detach-segment-form-component>
</modal-component>
</div>
</div>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="assignSegment">
<assign-segment-form-component :data="item" section="customerProfileSection"></assign-segment-form-component>
</modal-component>
@@ -123,7 +126,7 @@
<change-customer-contact-number-form-component :section="'customerProfileSection'" :data="item"></change-customer-contact-number-form-component>
</modal-component>
<h6 class="no-margin">
{{item?.contact?.phone || 'N/A'}}
{{ (item && item.contact && item.contact.phone) || 'N/A' }} <!-- {{item?.contact?.phone || 'N/A'}} -->
<div class="btn btn-xs b-rad-none pointer requestModal d-inline rounded no-border hover-primary bg-transparent" data-type="changeCustomerContactNumber" v-if="$store.getters.isAdmin">
<i class="fa fa-edit pointer fa-fw fs-15 m-l-5"></i>
</div>
@@ -224,7 +227,7 @@
</div>
</div>
</div>
<div class="col-auto">
<div class="col-1">
<div class="row justify-content-end m-t-5 m-b-5">
<div class="col-auto text-right">
<div class="font-heading fs-10 all-caps p-t-5 p-b-5 p-l-10 p-r-15 b-rad-sm bg-master-lighter">
@@ -1,5 +1,10 @@
import { required, requiredIf, numeric } from "vuelidate/lib/validators";
import addressFormHandler from '../addressFormHandler'
function notZero(value) {
return value !== 0 && value !== '0' && value !== null && value !== undefined;
}
export default {
validations: {
parameters: {
@@ -18,7 +23,7 @@ export default {
district_id: { required },
post_code: { required },
remark: {},
phone: {required, numeric},
phone: {required, numeric, notZero},
person_in_charge: { required },
property_type: { required },
additional_request: { },
@@ -37,4 +42,4 @@ export default {
}
},
mixins: [addressFormHandler]
}
}