Răsfoiți Sursa

Merge branch 'dev_zyh' of United_Software/k_online_ui into dev

Jack Zhou 2 luni în urmă
părinte
comite
1a6ace7cce

+ 1 - 0
package.json

@@ -71,6 +71,7 @@
     "postcss": "^8.4.41",
     "postcss-loader": "^8.1.1",
     "prettier": "^3.2.5",
+    "rollup-plugin-visualizer": "^6.0.3",
     "sass": "^1.79.4",
     "typescript": "~5.4.0",
     "unplugin-auto-import": "^0.18.2",

+ 3 - 1
src/components/ContainerStatus/src/ContainerStatus.vue

@@ -3,7 +3,9 @@ import { formatTimezone } from '@/utils/tools'
 import { useThemeStore } from '@/stores/modules/theme'
 import lightPng from './image/no_data.png'
 import darkPng from './image/no_data_dark.png'
+import { useUserStore } from '@/stores/modules/user'
 
+const userStore = useUserStore()
 const themeStore = useThemeStore()
 
 const emptyImg = computed(() => {
@@ -69,7 +71,7 @@ watch(
       <img :src="emptyImg" :class="{ 'is-dark': themeStore.theme === 'dark' }" alt="empty" />
       <div class="empty-text" style="">No data</div>
     </div>
-    <div class="footer" v-if="props.website">
+    <div class="footer" v-if="props.website && userStore.userInfo?.user_type === 'employee'">
       Tracking on carrier website:
       <a :href="props.website" target="_blank" class="link">{{ props.website }}</a>
     </div>

+ 25 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/BasicInformation.vue

@@ -47,6 +47,18 @@ const allData: any = ref({
       {
         label: 'Service Type',
         content: ''
+      },
+      {
+        label: 'CO2 Emission',
+        content: ''
+      },
+      {
+        label: 'Load Terms',
+        content: ''
+      },
+      {
+        label: 'Shipment Type',
+        content: ''
       }
     ]
   },
@@ -140,7 +152,7 @@ const convertData = (data: any) => {
         },
         {
           label: 'Ref No.',
-          content: data.ref_no
+          content: data.ref_no || '--'
         }
       ],
       bottom: [
@@ -159,6 +171,18 @@ const convertData = (data: any) => {
         {
           label: 'Service Type',
           content: data.basicInfo.Service_Type || '--'
+        },
+        {
+          label: 'CO2 Emission',
+          content: data.basicInfo['CO2 Emission'] || '--'
+        },
+        {
+          label: 'Load Terms',
+          content: data.basicInfo['Load Terms'] || '--'
+        },
+        {
+          label: 'Shipment Type',
+          content: data.basicInfo['Shipment Type'] || '--'
         }
       ]
     },

+ 1 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/EmailDrawer.vue

@@ -168,7 +168,7 @@ const sendEmail = () => {
   <div class="email-view">
     <div class="email-path">
       <span class="font_family icon-icon_email_b" style="font-size: 18px"></span>
-      <span class="label">Communication to Apex: &nbsp;</span>
+      <span class="label">Communication to KLN: &nbsp;</span>
       <span class="content">{{ emailData.email }}</span>
     </div>
     <div class="separated-by">

+ 2 - 0
vite.config.ts

@@ -6,6 +6,7 @@ import Components from 'unplugin-vue-components/vite'
 import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
 import Icons from 'unplugin-icons/vite'
 import IconsResolver from 'unplugin-icons/resolver'
+import { visualizer } from 'rollup-plugin-visualizer';
 
 // https://vitejs.dev/config/
 export default defineConfig(({ mode }) => {
@@ -18,6 +19,7 @@ export default defineConfig(({ mode }) => {
       }
     },
     plugins: [
+      visualizer(),
       vue(),
       AutoImport({
         resolvers: [