Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
karname-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Reza Sahebgharan
karname-ui
Commits
09feed9b
Commit
09feed9b
authored
Feb 04, 2020
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(bind devices combobox to clients db): bind device combo worklist to clients collection
Closes
KRN-47
parent
bf9eeda2
Pipeline
#1009
passed with stage
in 36 minutes and 38 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
91 deletions
+29
-91
DeviceMap.vue
client/components/DeviceMap.vue
+1
-0
Worklist.vue
client/components/Worklist.vue
+18
-24
i18n.js
client/plugins/i18n.js
+8
-10
devicecode.js
imports/api/collections/devicecode.js
+0
-14
devicecode.js
imports/api/methods/devicecode.js
+0
-26
devicecode.js
imports/api/server/publications/devicecode.js
+0
-15
main.js
server/main.js
+2
-2
No files found.
client/components/DeviceMap.vue
View file @
09feed9b
...
...
@@ -170,6 +170,7 @@ export default {
if
(
hislink
!=
undefined
&&
hislink
!=
null
&&
hislink
.
length
>
0
&&
hislink
[
0
].
Name
!=
undefined
)
currentDevicemap
.
push
({
...
devicemap
,
HisName
:
hislink
[
0
].
Name
});
...
...
client/components/Worklist.vue
View file @
09feed9b
...
...
@@ -8,7 +8,7 @@
<v-col
cols=
"12"
sm=
"6"
class=
"d-flex justify-space-around align-baseline"
>
<v-combobox
v-model=
"selectedDevice"
:items=
"
deviceCode
Items"
:items=
"
clients
Items"
:search-input
.
sync=
"deviceComboSearch"
hide-selected
:label=
"$t('WorkList.deviceComboboxLabel')"
...
...
@@ -17,8 +17,8 @@
clearable
dense
class=
"ma-4"
item-text=
"
GroupName
"
item-value=
"
GroupName
"
item-text=
"
Caption
"
item-value=
"
Caption
"
return-object
>
<template
v-if=
"noDataCombo"
v-slot:no-data
>
...
...
@@ -84,7 +84,6 @@
</v-btn>
<v-divider
class=
"mx-4"
inset
vertical
></v-divider>
<v-dialog
v-model=
"editDialog"
max-width=
"900px"
>
<v-card
class=
"grey lighten-4"
>
<v-progress-linear
...
...
@@ -511,7 +510,8 @@
<
script
>
import
Worklist
from
"../../imports/api/collections/worklist.js"
;
import
DeviceCode
from
"../../imports/api/collections/devicecode.js"
;
import
Clients
from
"../../imports/api/collections/clients.js"
;
import
HisWorklist
from
"./HisWorklist.vue"
;
export
default
{
...
...
@@ -549,11 +549,11 @@ export default {
debugger
;
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
GroupName
this
.
devicemap
!=
this
.
selectedDevice
.
Caption
)
{
let
self
=
this
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
GroupName
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
GroupName
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Caption
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Caption
;
});
}
...
...
@@ -725,18 +725,10 @@ export default {
},
selectedItem
:
undefined
,
sortedItems
:
undefined
}),
mounted
()
{
Meteor
.
call
(
"getDeviceCodes"
);
// this.selected = [this.desserts[1]];
},
computed
:
{
deviceCodeItems
()
{
// return this.devicecode.map(device => {
// return device.GroupName;
// });
return
this
.
devicecode
;
clientsItems
()
{
return
this
.
clients
;
},
headerOfTable
()
{
let
headers
=
[];
...
...
@@ -793,24 +785,26 @@ export default {
worklist
:
function
()
{
return
[
this
.
devicemap
];
},
devicecode
:
[]
clients
:
[]
},
worklist
()
{
return
Worklist
.
find
({}).
fetch
();
},
devicecode
()
{
return
DeviceCode
.
find
({}).
fetch
();
clients
()
{
return
Clients
.
find
({}).
fetch
();
}
},
watch
:
{
"$subReady.worklist"
(
ready
)
{},
selectedDevice
(
newDevice
,
oldDevice
)
{
console
.
log
(
newDevice
);
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
GroupName
)
{
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
Caption
)
{
let
self
=
this
;
this
.
fetchWorklistLoading
=
true
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
GroupName
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
GroupName
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Caption
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Caption
;
console
.
log
(
self
.
devicemap
);
self
.
fetchWorklistLoading
=
false
;
});
...
...
client/plugins/i18n.js
View file @
09feed9b
...
...
@@ -174,13 +174,13 @@ const messages = {
Login
:
{
loginHeader
:
'ورود کاربر'
,
registerBtn
:
'ثبت نام'
,
username
:
'
نام
کاربری'
,
username
:
'
شناسه
کاربری'
,
password
:
'رمز ورود'
,
loginBtn
:
'ورود'
,
passwordHint
:
'حداقل 8 کاراکتر'
,
required
:
'مورد نیاز'
,
min8Character
:
'حداقل 8 کاراکتر'
,
usernameAlert
:
'لطفا
نام
کاربری را وارد نمایید'
,
usernameAlert
:
'لطفا
شناسه
کاربری را وارد نمایید'
,
passwordAlert
:
'لطفا رمز ورود را وارد نمایید'
,
errorUserNotFound
:
'کاربر یافت نشد'
,
errorIncorrectPassword
:
'رمز نادرست'
,
...
...
@@ -189,17 +189,17 @@ const messages = {
Register
:
{
registerHeader
:
'ثبت نام کاربر'
,
loginBtn
:
'ورود'
,
username
:
'
نام
کاربری'
,
username
:
'
شناسه
کاربری'
,
password
:
'رمز ورود'
,
repeatPassword
:
'تکرار رمز ورود'
,
registerBtn
:
'ثبت نام و ورود'
,
required
:
'مورد نیاز'
,
min8Character
:
'حداقل 8 کاراکتر'
,
matchPass
:
"رمز عبور و تکرار آن باید مشابه باشند"
,
usernameAlert
:
'لطفا
نام
کاربری را وارد نمایید'
,
usernameAlert
:
'لطفا
شناسه
کاربری را وارد نمایید'
,
firstPassAlert
:
'لطفا رمز را وارد نمایید'
,
secondPassAlert
:
'لطفا رمز را وارد نمایید'
,
error403
:
'
نام
کاربری وجود دارد'
,
error403
:
'
شناسه
کاربری وجود دارد'
,
loadingText
:
'در حال ایجاد کاربر'
,
userCreated
:
'کاربر ایجاد شد'
},
...
...
@@ -211,8 +211,8 @@ const messages = {
},
ChangePassword
:
{
formHeader
:
'تغییر رمز'
,
username
:
'
نام
کاربری'
,
usernameAlert
:
'لطفا
نام
کاربری را وارد نمایید'
,
username
:
'
شناسه
کاربری'
,
usernameAlert
:
'لطفا
شناسه
کاربری را وارد نمایید'
,
oldPassword
:
'رمز فعلی'
,
oldPasswordAlert
:
'لطفا رمز فعلی را وارد نمایید'
,
newPassword
:
'رمز جدید'
,
...
...
@@ -303,13 +303,11 @@ const messages = {
editBtn
:
"ویرایش"
,
userSelectStatement
:
"لطفا یکی از کاربر ها را انتخاب نمایید"
,
userDeleteStatement
:
"کاربر حذف گردید"
,
UsernameTxtBox
:
"
نام
کاربری"
,
UsernameTxtBox
:
"
شناسه
کاربری"
,
FullNameTxtBox
:
"نام و نام خانوادگی"
,
ResetPasswordBtn
:
"تغییر رمز"
,
matchPassword
:
"رمز و تکرار آن می بایست یکی باشد"
,
minimum5Character
:
"رمز باید حداقل دارای 5 کاراکتر باشد"
},
HisWorklist
:
{
title
:
"لیست بیماران"
...
...
imports/api/collections/devicecode.js
deleted
100644 → 0
View file @
bf9eeda2
import
{
Mongo
}
from
'meteor/mongo'
;
import
{
Meteor
}
from
'meteor/meteor'
;
let
DeviceCode
;
if
(
Meteor
.
isClient
||
Meteor
.
isCordova
)
{
DeviceCode
=
new
Mongo
.
Collection
(
'devicecode'
)
}
if
(
Meteor
.
isServer
)
{
DeviceCode
=
new
Mongo
.
Collection
(
'devicecode'
,
{
connection
:
null
})
}
export
default
DeviceCode
;
\ No newline at end of file
imports/api/methods/devicecode.js
deleted
100644 → 0
View file @
bf9eeda2
import
{
Meteor
}
from
'meteor/meteor'
;
import
{
check
}
from
'meteor/check'
;
import
{
HTTP
}
from
'meteor/http'
;
import
DeviceCode
from
'../collections/devicecode.js'
;
Meteor
.
methods
({
'getDeviceCodes'
()
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
const
result
=
HTTP
.
call
(
'GET'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/getdevicecodes`
);
let
deviceCodeHttpResult
=
JSON
.
parse
(
result
.
content
);
DeviceCode
.
remove
({});
deviceCodeHttpResult
.
Devices
.
forEach
((
device
)
=>
{
DeviceCode
.
insert
({
...
device
});
});
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
return
false
;
}
}
}
});
\ No newline at end of file
imports/api/server/publications/devicecode.js
deleted
100644 → 0
View file @
bf9eeda2
import
DeviceCode
from
'../../collections/devicecode.js'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
publish
(
"devicecode"
,
function
()
{
if
(
!
this
.
userId
)
{
return
this
.
ready
();
}
return
DeviceCode
.
find
({},
{
disableOplog
:
true
,
// pollingThrottleMs: 1000,
pollingIntervalMs
:
1000
});
});
\ No newline at end of file
server/main.js
View file @
09feed9b
...
...
@@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import
'../imports/api/methods/worklist.js'
;
import
'../imports/api/methods/changePassword.js'
;
import
'../imports/api/methods/devicecode.js'
;
import
'../imports/api/methods/brands.js'
;
import
'../imports/api/methods/hisLink.js'
;
import
'../imports/api/methods/clients.js'
;
...
...
@@ -11,7 +11,7 @@ import '../imports/api/methods/users.js'
import
'../imports/api/server/publications/worklist.js'
;
import
'../imports/api/server/publications/devicecode.js'
;
import
'../imports/api/server/publications/hislink.js'
;
import
'../imports/api/server/publications/brands.js'
;
import
'../imports/api/server/publications/clients.js'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment