diff --git a/.drone.yml b/.drone.yml index 0dc5bb65..321785c2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,13 +8,12 @@ clone: # npm config set _auth token add command steps: - name: clone - image: docker.willaspace.com/repository/docker-hosted/alpine/git + image: docker-proxy.willaspace.com/alpine/git commands: - git clone $DRONE_GIT_HTTP_URL . - git checkout $DRONE_COMMIT - name: Build docker image - image: plugins/docker - mirror: https://docker.willaspace.com/repository/docker-hosted/ + image: docker-proxy.willaspace.com/plugins/docker environment: REGISTRY_USER_NAME: from_secret: registry_username @@ -41,8 +40,7 @@ steps: - push - name: Build docker nginx image - image: plugins/docker - mirror: https://docker.willaspace.com/repository/docker-hosted/ + image: docker-proxy.willaspace.com/plugins/docker settings: tags: - nginx-latest @@ -61,7 +59,7 @@ steps: - push - name: deploy - image: docker.willaspace.com/repository/docker-hosted/pelotech/drone-helm3:latest + image: docker-proxy.willaspace.com/pelotech/drone-helm3:latest environment: USERNAME: from_secret: registry_username diff --git a/.values.yaml b/.values.yaml index 3557c9a5..980336fd 100644 --- a/.values.yaml +++ b/.values.yaml @@ -392,13 +392,15 @@ ingress: # List of host addresses to be exposed by this Ingress hosts: - - host: cssd-doc.ir - - host: cssd-doc.com + - host: www.cssd-doc.ir + - host: www.cssd-doc.com # Additional labels for this Ingress additionalLabels: # Add annotations to this Ingress annotations: + ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" # kubernetes.io/ingress.class: external-ingress # ingress.kubernetes.io/rewrite-target: / # ingress.kubernetes.io/force-ssl-redirect: true @@ -408,10 +410,10 @@ ingress: # Secrets must be manually created in the namespace. - secretName: cssd-doc-ir-certificate hosts: - - cssd-doc.ir + - www.cssd-doc.ir - secretName: cssd-doc-com-certificate hosts: - - cssd-doc.com + - www.cssd-doc.com ########################################################## # Route object for exposing services (OpenShift) @@ -574,13 +576,19 @@ configMap: listen 80; server_name cssd-doc.ir www.cssd-doc.ir; - return 301 https://cssd-doc.com$request_uri; + return 301 https://www.cssd-doc.com$request_uri; } - server { listen 80; - server_name cssd-doc.com www.cssd-doc.com; + server_name cssd-doc.com; + + return 301 https://www.cssd-doc.com$request_uri; + } + + server { + listen 80; + server_name www.cssd-doc.com; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log; diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 44330d0b..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: '2' - -services: - - app: - container_name: cssd - image: registry.willaspace.com/willaspace/cssd - #build: - # context: ./ - volumes: - - /home/administrator/apps/nginx/www/cssd/storage:/var/www/storage - - /home/administrator/apps/nginx/www/cssd/public:/var/www/public - env_file: '.env' - environment: - - "DB_HOST=mysql_database" - - "REDIS_HOST=cache" - -networks: - default: - external: - name: willaengine_default diff --git a/resources/js/vue/components/modal/barcode/Barcode.vue b/resources/js/vue/components/modal/barcode/Barcode.vue index debf9b23..218df677 100644 --- a/resources/js/vue/components/modal/barcode/Barcode.vue +++ b/resources/js/vue/components/modal/barcode/Barcode.vue @@ -9,19 +9,20 @@
- {{ Type+ ' ID :' + ID }} - {{ Type+ ':' + ID }} + {{ `${Type} ${item.udi ? 'UDI :' : 'ID :'} ${ID}` }} + {{ Type + ':' + ID }}
- + - + fas fa-print Print @@ -35,15 +36,17 @@ import { mapGetters } from "vuex"; export default { data: () => ({ - barcodeimg : null, - QRCodeimg : null, - ShowLink : '', - Type : '', - ID : '' + barcodeimg: null, + QRCodeimg: null, + ShowLink: '', + Type: '', + ID: '', + item: {} }), created() { + this.item = this.getModalProperties.item ? this.getModalProperties.item : {}; this.barcodeimg = this.getModalProperties.result.data.data.Barcode ? this.getModalProperties.result.data.data.Barcode : null; - this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null; + this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null; this.ShowLink = this.getModalProperties.result.data.data.ShowLink ? this.getModalProperties.result.data.data.ShowLink : '#'; this.Type = this.ShowLink.split('/')[1]; this.ID = this.ShowLink.split('/')[2]; diff --git a/resources/js/vue/config/urls.js b/resources/js/vue/config/urls.js index acc7193b..4f25b7ac 100644 --- a/resources/js/vue/config/urls.js +++ b/resources/js/vue/config/urls.js @@ -182,6 +182,9 @@ const urls = { }, packageQRCode: function(code) { return `/Package/QRCode/${code}`; + }, + changeItemStatus: function(id) { + return `/Items/ChangeStatus/${id}`; } }; export { urls }; diff --git a/resources/js/vue/styles/css/Assets/Main.scss b/resources/js/vue/styles/css/Assets/Main.scss index c934f12d..d1f544d7 100644 --- a/resources/js/vue/styles/css/Assets/Main.scss +++ b/resources/js/vue/styles/css/Assets/Main.scss @@ -4,12 +4,14 @@ font-weight: 100; src: url('../../fonts/Montserrat-Regular.ttf') format('truetype'); } + @font-face { font-family: 'Montserrat-Medium'; font-style: normal; font-weight: medium; src: url('../../fonts/Montserrat-Medium.ttf') format('truetype'); } + @font-face { font-family: 'Montserrat-Bold'; font-style: normal; @@ -17,12 +19,28 @@ src: url('../../fonts/Montserrat-Bold.ttf') format('truetype'); } -body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,.title,.display-1 { +body, +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.title, +.display-1 { font-family: 'Montserrat-Regular' !important; } -.CSSD-font, .headline.CSSD-font, h3.CSSD-font { + +.CSSD-font, +.headline.CSSD-font, +h3.CSSD-font { font-family: 'Montserrat-Regular' !important; } + .application { font-family: 'Montserrat-Regular'; } @@ -33,100 +51,130 @@ body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,.title,.display-1 { border-color: transparent !important; box-shadow: none !important; } + .WM-InlineFlex { display: inline-flex; } + .WM-FlexCenter { display: inline-flex; align-items: center; } + .WM-FlexWrap { display: flex; flex-wrap: wrap; } + .WM-BorderRadius-5 { border-radius: 5px; } + .WM-Margin-B-8 { margin-bottom: 8px; } + .material-icons { font-size: 20px !important; vertical-align: sub !important; } -.fa, .fas { + +.fa, +.fas { font-size: 20px; } + .headline { // letter-spacing : 7px; } + .WM-NoLetterSpacing-7 { letter-spacing: 7px !important; } + .WM-NoLetterSpacing { letter-spacing: 0; } + .WM-Border-L-3x { - border-left: 3px solid; + border-left: 3px solid; } + .WM-OrangeGradient-BG { - background: linear-gradient(-245.99599235188236deg, rgba(252, 184, 162,1) -0.3020833333333286%,rgba(255, 236, 210,1) 93.03125%); + background: linear-gradient(-245.99599235188236deg, rgba(252, 184, 162, 1) -0.3020833333333286%, rgba(255, 236, 210, 1) 93.03125%); } + .WM-BlueGradient-BG { - background: linear-gradient(-246.25375448810587deg, rgba(213, 245, 253,1) 0.4518229166666856%,rgba(233, 255, 247,1) 92.79557291666667%) + background: linear-gradient(-246.25375448810587deg, rgba(213, 245, 253, 1) 0.4518229166666856%, rgba(233, 255, 247, 1) 92.79557291666667%) } + .WM-CoffeeGradient-BG { - background : linear-gradient(-246.25375448810587deg, rgba(226, 210, 196,1) 0.2955729166666856%,rgba(250, 247, 245,1) 92.63932291666667%); + background: linear-gradient(-246.25375448810587deg, rgba(226, 210, 196, 1) 0.2955729166666856%, rgba(250, 247, 245, 1) 92.63932291666667%); } + .WM-MuskGradient-BG { - background : linear-gradient(113.58893008880955deg, rgba(167, 204, 225,1) 4.927083333333334%,rgba(236, 246, 237,1) 97.84374999999999%); + background: linear-gradient(113.58893008880955deg, rgba(167, 204, 225, 1) 4.927083333333334%, rgba(236, 246, 237, 1) 97.84374999999999%); } + .WM-CyanBlueGradient-BG { - background:linear-gradient(90deg, rgba(29,200,230,1) 20.5625%,rgba(29,200,229,1) 20.5625%,rgba(29,230,184,1) 80.5625%); + background: linear-gradient(90deg, rgba(29, 200, 230, 1) 20.5625%, rgba(29, 200, 229, 1) 20.5625%, rgba(29, 230, 184, 1) 80.5625%); } + .WM-GreyGradient-BG { - background :linear-gradient(-248.2097473199551deg, rgba(220, 220, 220,1) 0.71484375%,rgba(246, 245, 245,1) 92.95442708333334%) + background: linear-gradient(-248.2097473199551deg, rgba(220, 220, 220, 1) 0.71484375%, rgba(246, 245, 245, 1) 92.95442708333334%) } + .WM-GreenGradient-BG { - background : linear-gradient(112.72013189013455deg, rgba(98, 185, 183,1) 4.927083333333334%,rgba(236, 246, 237,1) 97.84374999999999%) + background: linear-gradient(112.72013189013455deg, rgba(98, 185, 183, 1) 4.927083333333334%, rgba(236, 246, 237, 1) 97.84374999999999%) } + .WM-YellowPinkGradient-BG { - background : linear-gradient(111.36820033167237deg, rgba(249, 231, 148,1) 4.927083333333334%,rgba(246, 190, 212,1) 97.84374999999999%) + background: linear-gradient(111.36820033167237deg, rgba(249, 231, 148, 1) 4.927083333333334%, rgba(246, 190, 212, 1) 97.84374999999999%) } + .WM-YellowGradient-BG { - background : linear-gradient(111.36820033167237deg, #f8c369 4.927083333333334%,#ffe8c1 97.84374999999999%) + background: linear-gradient(111.36820033167237deg, #f8c369 4.927083333333334%, #ffe8c1 97.84374999999999%) } + .WM-LightGreenGradient-BG { - background : linear-gradient(111.36820033167237deg, #90f7ec 4.927083333333334%,#32ccbc 97.84374999999999%) + background: linear-gradient(111.36820033167237deg, #90f7ec 4.927083333333334%, #32ccbc 97.84374999999999%) } + .WM-PinkGradient-BG { background: linear-gradient(to right, #ee9ca7, #ffdde1); } + .WM-LightGray-color { - color: rgba(33,33,33,.7) + color: rgba(33, 33, 33, .7) } + .WM-Outline-Btn { padding: 8px; - background:transparent !important; + background: transparent !important; } + .container.grid-list-xl :not(:only-child) .layout:last-child { - margin : 0 !important; + margin: 0 !important; } + .v-navigation-drawer .v-list .v-list-item .v-list__tile.v-list__tile--active { - -webkit-box-shadow: none !important; - box-shadow: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; } + .v-btn.WM-NoShadow:not(.v-btn--depressed):not(.v-btn--flat) { -webkit-box-shadow: none !important; box-shadow: none !important; padding: 8px 30px; } + .inputfile { - opacity: 0; - overflow: hidden; - position: absolute; + opacity: 0; + overflow: hidden; + position: absolute; } -.inputfile + label { + +.inputfile+label { font-size: 16px; display: inline-block; font-weight: 400; @@ -139,56 +187,68 @@ body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,.title,.display-1 { border-radius: 5px; } -.inputfile:focus + label, -.inputfile + label:hover { +.inputfile:focus+label, +.inputfile+label:hover { border: 1px solid #000; color: #000; } + .inputfile:focus .IconHover, .inputfile .IconHover:hover { color: #000 !important; } -.v-pagination>li:focus { -} +.v-pagination>li:focus {} + .theme--light.v-pagination .v-pagination__item:focus { outline: 0 !important; } + table.v-table tbody td.Height-MD-60 { height: 60px; } + table.v-table tbody td.Height-MD-80 { height: 80px; } + .FlexBtn { display: flex; flex-wrap: nowrap; padding: 10px 8px !important; justify-content: flex-start; } + td.FlexBtn .theme--light.v-btn { padding: 21px 20px; } -td.FlexBtn a.LinkBtn .theme--light.v-btn { + +td.FlexBtn a.LinkBtn .theme--light.v-btn { padding: 12px 10px; } + .ResultMsg { font-size: 10px; color: #fff; padding: 3px 10px; border-radius: 5px; -} -.ResultMsg.Reject{ +} + +.ResultMsg.Reject { background: #ee3552; } -.ResultMsg.Accept{ - background: #1DE6B8;; + +.ResultMsg.Accept { + background: #1DE6B8; + ; } + .theme--light.v-icon.Verified { font-size: 15px !important; color: #1DE6B8; } + .theme--light.v-icon.NotVerified { font-size: 15px !important; color: #ee3552; @@ -198,37 +258,47 @@ td.FlexBtn a.LinkBtn .theme--light.v-btn { table.v-table tbody td.FlexBtn:not(:first-child) { padding: 12px 8px; } + td.FlexBtn .v-btn { margin-top: 5px; } + .WM-WidthScreen-SM { - flex-basis:35% !important; + flex-basis: 35% !important; max-width: 35% !important; } + table.v-table tbody td.Height-SM-48 { height: 48px; } + .v-card .title { font-size: .9rem !important; } + .headline { font-size: .9rem !important; } + .FlexBtn { padding: 10px 8px !important; } + td.FlexBtn span { display: none; } + td.FlexBtn .theme--light.v-btn { min-width: 30px; padding: 15px 10px; margin-right: 1 !important; - -} -td.FlexBtn a.LinkBtn .theme--light.v-btn { + +} + +td.FlexBtn a.LinkBtn .theme--light.v-btn { padding: 9px 10px; } + td.FlexBtn .theme--light.v-icon { margin-right: 0 !important; } @@ -237,8 +307,9 @@ td.FlexBtn .theme--light.v-icon { .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; // } @@ -254,47 +325,56 @@ td.FlexBtn .theme--light.v-icon { -table.v-table tbody td.Height-SM-48 { - height: 48px; -} -.v-card .title { - font-size: .9rem !important; -} -.headline { - font-size: .9rem !important; -} -.FlexBtn { - padding: 10px 8px !important; -} -td.FlexBtn span { - display: none; -} -td.FlexBtn .theme--light.v-btn { - min-width: 30px; - padding: 15px 10px; - margin-right: 1 !important; -} -td.FlexBtn a.LinkBtn .theme--light.v-btn { - padding: 9px 10px; -} -td.FlexBtn .theme--light.v-icon { - margin-right: 0 !important; -} + table.v-table tbody td.Height-SM-48 { + height: 48px; + } + + .v-card .title { + font-size: .9rem !important; + } + + .headline { + font-size: .9rem !important; + } + + .FlexBtn { + padding: 10px 8px !important; + } + + td.FlexBtn span { + display: none; + } + + td.FlexBtn .theme--light.v-btn { + min-width: 30px; + padding: 15px 10px; + margin-right: 1 !important; + } + + td.FlexBtn a.LinkBtn .theme--light.v-btn { + padding: 9px 10px; + } + + td.FlexBtn .theme--light.v-icon { + margin-right: 0 !important; + } } -@media screen and(max-width : 1366px) { + +@media screen and (max-width : 1366px) { .FlexBtn { // padding: 10px 8px !important; padding: 20px 8px !important; } + td.FlexBtn .v-btn { margin-top: -5px; } } -@media screen and(max-width : 1024px) { +@media screen and (max-width : 1024px) { .WM-WidthScreen-XS { - flex-basis:60% !important; + flex-basis: 60% !important; max-width: 60% !important; } -} +} \ No newline at end of file diff --git a/resources/js/vue/views/Item/AddEdit.vue b/resources/js/vue/views/Item/AddEdit.vue index 51b56033..7764e629 100644 --- a/resources/js/vue/views/Item/AddEdit.vue +++ b/resources/js/vue/views/Item/AddEdit.vue @@ -5,14 +5,8 @@ - + - + - + - + + + + + + + + + + - + @@ -68,7 +57,7 @@ - + keyboard_arrow_left Back @@ -85,9 +74,17 @@ import { ApiService } from "@/services"; import { urls } from "@/config/urls"; import { mapMutations } from 'vuex'; +import Dropzone from '@/components/core/Dropzone' + export default { + components: { + 'wm-Dropzone': Dropzone, + }, data() { return { + galleries: [], + galleryDataLoaded: false, + file_batch_id: Math.floor(Math.random() * 9000000000) + 1000000000, formData: { name: "", unique_id: "", @@ -105,27 +102,37 @@ export default { created() { if (this.$route.params.Item) { this.load(this.$route.params.Item); + } else { + this.galleryDataLoaded = true; } }, methods: { async load(id) { const result = await ApiService.get(urls.editItem(id)); if (result.status == 200) { + this.galleries = result.data.data.filesPath; + this.galleryDataLoaded = true; this.formData = result.data.data; } }, - async submitForm() { + async submitForm() { let result; + this.formData['file_batch_id'] = this.file_batch_id; if (this.$route.params.Item) { - result = await ApiService.put(urls.updateItem(this.$route.params.Item), this.formData); + result = await ApiService.put(urls.updateItem(this.$route.params.Item), this.formData); } else { - result = await ApiService.post(urls.storeItem, this.formData); + result = await ApiService.post(urls.storeItem, this.formData); } if (result && result.status == 200) { - this.$router.push({name: 'AllItem'}) + this.$router.push({ name: 'AllItem' }) } }, } }; + \ No newline at end of file diff --git a/resources/js/vue/views/Item/List.vue b/resources/js/vue/views/Item/List.vue index 645875cd..9dcf8ec1 100644 --- a/resources/js/vue/views/Item/List.vue +++ b/resources/js/vue/views/Item/List.vue @@ -5,43 +5,22 @@ - + - + - - - + + + - + @@ -51,7 +30,7 @@ - + fas fa-plus Add @@ -66,66 +45,71 @@ @@ -172,10 +156,15 @@ export default { value: "name" }, { - sortable: true, - text: "Hospital", - value: "Hospital" - }, + sortable: true, + text: "Hospital", + value: "Hospital" + }, + { + sortable: false, + text: "UDI", + value: "udi" + }, { sortable: false, text: "Size", @@ -191,8 +180,8 @@ export default { filter: { name: '', size: '', - item_id : '', - medical_center_id : '' + item_id: '', + medical_center_id: '' }, items: [], currentPage: 1, @@ -223,12 +212,13 @@ export default { } this.loadMedicalCenters(); }, - async generateBarcode(code, type = null) { + async generateBarcode(item, type = null) { + let code = item.udi ? item.udi : item.id; const result = await ApiService.post(urls.Barcode(code, type)); if (result && result.status == 200) { this.changeCurrentModal({ modal: "modal-barcode-barcode", - properties: { result }, + properties: { result, item }, }); } }, @@ -258,12 +248,28 @@ export default { } } }, + async changeStatus(id) { + const result = await ApiService.post( + urls.changeItemStatus(id) + ); + if (result) { + for (const key in this.items) { + if ( + this.items.hasOwnProperty(key) && + this.items[key].id == id + ) { + this.items[key].status = result.data.data.status; + } + } + } + }, + async loadMedicalCenters() { - const result = await ApiService.get(urls.listFilterItemsTestResult); - if (result && result.status == 200) { - this.medicalCenters = result.data.data.MedicalCenters; - } - }, + const result = await ApiService.get(urls.listFilterItemsTestResult); + if (result && result.status == 200) { + this.medicalCenters = result.data.data.MedicalCenters; + } + }, }, watch: { currentPage(page) { @@ -274,12 +280,15 @@ export default { diff --git a/resources/js/vue/views/MedicalCenter/OperatorList.vue b/resources/js/vue/views/MedicalCenter/OperatorList.vue index 8e44e04d..9d9dfe0c 100644 --- a/resources/js/vue/views/MedicalCenter/OperatorList.vue +++ b/resources/js/vue/views/MedicalCenter/OperatorList.vue @@ -51,7 +51,7 @@ > @@ -176,15 +153,19 @@ export default { value: "name" }, { - sortable: true, - text: "Hospital", - value: "Hospital" - }, + sortable: true, + text: "Hospital", + value: "Hospital" + }, { sortable: true, text: "User", value: "User" }, + { + text: "UDI", + value: "udi" + }, { sortable: true, text: "Description", @@ -199,8 +180,8 @@ export default { ], filter: { name: '', - package_id : '', - medical_center_id : '' + package_id: '', + medical_center_id: '' }, result: ['Pass', 'Fail'], items: [], @@ -267,10 +248,10 @@ export default { } }, async loadMedicalCenters() { - const result = await ApiService.get(urls.listFilterItemsTestResult); - if (result && result.status == 200) { - this.medicalCenters = result.data.data.MedicalCenters; - } + const result = await ApiService.get(urls.listFilterItemsTestResult); + if (result && result.status == 200) { + this.medicalCenters = result.data.data.MedicalCenters; + } }, }, computed: { @@ -295,12 +276,15 @@ export default { diff --git a/resources/js/vue/views/TestResult/List.vue b/resources/js/vue/views/TestResult/List.vue index 7332c091..4a52446e 100644 --- a/resources/js/vue/views/TestResult/List.vue +++ b/resources/js/vue/views/TestResult/List.vue @@ -1,132 +1,60 @@ + diff --git a/resources/js/vue/views/User/List.vue b/resources/js/vue/views/User/List.vue index dc6473d4..13f9fdd0 100644 --- a/resources/js/vue/views/User/List.vue +++ b/resources/js/vue/views/User/List.vue @@ -137,14 +137,14 @@ - Susspended + Suspended Active