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
761f6ecc
Commit
761f6ecc
authored
Sep 18, 2019
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Password UI
parent
b6147118
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
582 additions
and
59 deletions
+582
-59
App.vue
client/App.vue
+12
-3
AppFooter.vue
client/components/AppFooter.vue
+9
-6
AuthHeader.vue
client/components/AuthHeader.vue
+10
-1
Worklist.vue
client/components/Worklist.vue
+45
-13
main.js
client/main.js
+2
-0
i18n.js
client/plugins/i18n.js
+40
-7
routes.js
client/plugins/routes.js
+5
-0
ChangePassword.vue
client/views/ChangePassword.vue
+284
-0
Login.vue
client/views/Login.vue
+41
-7
Main.vue
client/views/Main.vue
+6
-4
Register.vue
client/views/Register.vue
+21
-8
worklist.js
imports/api/collections/worklist.js
+17
-0
changePassword.js
imports/api/methods/changePassword.js
+34
-0
worklist.js
imports/api/methods/worklist.js
+38
-9
worklist.js
imports/api/server/publications/worklist.js
+15
-0
font.css
public/fonts/font.css
+1
-1
main.js
server/main.js
+2
-0
No files found.
client/App.vue
View file @
761f6ecc
<
template
>
<v-app>
<transition
name=
"fade"
mode=
"out-in"
>
<keep-alive>
<router-view></router-view>
</keep-alive>
</transition>
</v-app>
</
template
>
<
script
>
...
...
@@ -42,9 +42,18 @@ export default {
</
script
>
<
style
>
#
app
{
#
inspire
{
font-family
:
"Vazir"
;
}
/* label,span{
font-family: Vazir;
} */
.v-messages__message
{
font-family
:
Vazir
;
font-size
:
0.5rem
;
}
html
{
overflow-y
:
auto
!important
;
}
...
...
client/components/AppFooter.vue
View file @
761f6ecc
<
template
>
<v-footer
inset
elevation=
"24"
color=
"#0065613b"
app
height=
"30"
>
<v-row
justify=
"center"
align=
"center"
class=
"text-center red--text"
>
<v-footer
color=
"#c0d7d6"
height=
"40px"
app
elevation=
"24"
class=
"d-flex justify-center align-center text-center red--text"
>
<v-menu
transition=
"slide-x-transition"
>
<template
v-slot:activator=
"
{ on }">
<v-btn
...
...
@@ -18,10 +23,7 @@
</v-list-item>
</v-list>
</v-menu>
<!-- <v-img src="/img/0.png" contain max-height="60" max-width="60"></v-img> -->
<h5>
©2005-{{ new Date().getFullYear() }} MARCO PACS
</h5>
</v-row>
</v-footer>
</template>
...
...
@@ -48,6 +50,6 @@ export default {
position
:
absolute
;
left
:
0
;
}
</
style
>
>
</
style
>
</style>
\ No newline at end of file
client/components/AuthHeader.vue
View file @
761f6ecc
<
template
>
<!--
<v-app-bar
app
elevation=
"24"
color=
"teal lighten-3"
>
-->
<v-app-bar
app
elevation=
"24"
color=
"#0065613b
"
>
<v-app-bar
fixed
app
elevation=
"24"
color=
"#c0d7d6
"
>
<v-toolbar-title
class=
"red--text"
>
{{
$t
(
'AppHeader.appName'
)
}}
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn
text
color=
"red red--text"
:to=
"btnTo"
>
...
...
@@ -9,6 +9,15 @@
<strong>
{{
$t
(
btnLabel
)
}}
</strong>
</v-btn>
</v-app-bar>
<!--
<v-toolbar
absolute
fixed
app
elevation=
"24"
color=
"#0065613b"
style=
"width:100%"
>
<v-toolbar-title
class=
"red--text"
>
{{
$t
(
'AppHeader.appName'
)
}}
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn
text
color=
"red red--text"
:to=
"btnTo"
>
<v-icon
left
>
{{
btnIconName
}}
</v-icon>
<strong>
{{
$t
(
btnLabel
)
}}
</strong>
</v-btn>
</v-toolbar>
-->
</
template
>
<
script
>
...
...
client/components/Worklist.vue
View file @
761f6ecc
<
template
>
<div
style=
"width:100%"
class=
"d-flex fill-height align-start justify-center flex-wrap"
>
<div
style=
"width:100%;display:flex;justify-content:center"
>
<v-card
outlined
raised
>
<v-card
outlined
raised
>
<v-container
fluid
>
<v-row
justify=
"center"
dense
class=
"flex-wrap"
>
<v-col
md=
"6"
cols=
"12"
>
<v-card>
<v-card>
<v-card-actions>
<v-combobox
v-model=
"model"
...
...
@@ -46,8 +47,10 @@
</v-btn>
</v-card-actions>
</v-card>
</div>
<div
style=
"width:100%;display:flex;justify-content:center"
class=
"ma-3"
>
</v-col>
</v-row>
<v-row
justify=
"center"
dense
class=
"flex-wrap"
>
<v-col
cols=
"12"
>
<v-data-table
v-model=
"selected"
:headers=
"headers"
...
...
@@ -55,19 +58,22 @@
single-select
item-key=
"name"
show-select
hide-default-footer
class=
"elevation-1"
disable-pagination
height=
"600"
style=
"width:100%"
></v-data-table>
</div>
</div>
</v-col>
</v-row>
</v-container>
</template>
<
script
>
import
Worklist
from
"../../imports/api/collections/worklist.js"
;
import
{
Tracker
}
from
"meteor/tracker"
;
export
default
{
data
:
()
=>
({
devicemap
:
"ratio"
,
items
:
[
"Gaming"
,
"Programming"
,
"Vue"
,
"Vuetify"
],
model
:
[
"Vuetify"
],
search
:
null
,
...
...
@@ -171,9 +177,34 @@ export default {
carbs
:
65
,
protein
:
7
,
iron
:
"6%"
},
}
]
})
}),
mounted
()
{
Meteor
.
setTimeout
(()
=>
{
this
.
devicemap
=
"ct"
;
},
5000
);
Meteor
.
setTimeout
(()
=>
{
this
.
devicemap
=
"ratio"
;
},
10000
);
},
meteor
:
{
$subscribe
:
{
worklist
:
function
()
{
return
[
this
.
devicemap
];
}
},
worklist
()
{
return
Worklist
.
find
({});
}
},
watch
:
{
worklist
:
(
newWorklist
,
oldWorklist
)
=>
{
console
.
log
(
newWorklist
);
},
"$subReady.worklist"
:
ready
=>
{
console
.
log
(
ready
);
}
}
};
</
script
>
\ No newline at end of file
client/main.js
View file @
761f6ecc
...
...
@@ -22,6 +22,8 @@ import { store } from './store/store';
import
i18n
from
'./plugins/i18n'
;
Meteor
.
startup
(()
=>
{
new
Vue
({
i18n
,
...
...
client/plugins/i18n.js
View file @
761f6ecc
...
...
@@ -4,11 +4,6 @@ Vue.use(VueI18n);
const
messages
=
{
'en'
:
{
$vuetify
:
{
dataTable
:
{
itemsPerPageText
:
'منستیبمتن سمکنیتب '
}
},
Login
:
{
loginHeader
:
'Login'
,
registerBtn
:
'Register'
,
...
...
@@ -21,7 +16,8 @@ const messages = {
usernameAlert
:
'please enter username'
,
passwordAlert
:
'please enter password'
,
errorUserNotFound
:
'User not found'
,
errorIncorrectPassword
:
'Incorrect Password'
errorIncorrectPassword
:
'Incorrect Password'
,
changePassword
:
'Change Password?'
},
Register
:
{
registerHeader
:
'Register'
,
...
...
@@ -45,6 +41,24 @@ const messages = {
},
AppFooter
:
{
appLang
:
'en'
,
},
ChangePassword
:
{
formHeader
:
'change password'
,
username
:
'username'
,
usernameAlert
:
'please enter username'
,
oldPassword
:
'old password'
,
oldPasswordAlert
:
'please enter old password'
,
newPassword
:
'new password'
,
newPasswordAlert
:
'please enter new password'
,
matchPass
:
'old password and new password should not be the same'
,
required
:
'Required'
,
min8Character
:
'Min 8 Characters'
,
changePasswordBtn
:
'change'
,
loadingText
:
'changing password'
,
NotFoundUser
:
'user not found'
,
CheckPassError
:
'incorrect old password'
,
SuccessChangePass
:
'Password Successfully changed'
,
internalServerError
:
'internal server error'
}
...
...
@@ -62,7 +76,8 @@ const messages = {
usernameAlert
:
'لطفا نام کاربری را وارد نمایید'
,
passwordAlert
:
'لطفا رمز ورود را وارد نمایید'
,
errorUserNotFound
:
'کاربر یافت نشد'
,
errorIncorrectPassword
:
'رمز نادرست'
errorIncorrectPassword
:
'رمز نادرست'
,
changePassword
:
'تغییر رمز؟'
},
Register
:
{
registerHeader
:
'ثبت نام کاربر'
,
...
...
@@ -86,6 +101,24 @@ const messages = {
},
AppFooter
:
{
appLang
:
'فا'
,
},
ChangePassword
:
{
formHeader
:
'تغییر رمز'
,
username
:
'نام کاربری'
,
usernameAlert
:
'لطفا نام کاربری را وارد نمایید'
,
oldPassword
:
'رمز فعلی'
,
oldPasswordAlert
:
'لطفا رمز فعلی را وارد نمایید'
,
newPassword
:
'رمز جدید'
,
newPasswordAlert
:
'لطفا رمز جدید را وارد نمایید'
,
matchPass
:
'رمز فعلی و رمز جدید نباید یکسان باشند'
,
required
:
'مورد نیاز'
,
min8Character
:
'حداقل 8 کاراکتر'
,
changePasswordBtn
:
'تغییر رمز'
,
loadingText
:
'در حال تغییر رمز'
,
NotFoundUser
:
'کاربر یافت نشد'
,
CheckPassError
:
'رمز فعلی نادرست می باشد'
,
SuccessChangePass
:
'رمز کاربر با موفقیت تغییر یافت'
,
internalServerError
:
'خطا در سرور'
}
}
...
...
client/plugins/routes.js
View file @
761f6ecc
import
Login
from
'../views/Login.vue'
;
import
Home
from
'../views/Home.vue'
;
import
Register
from
'../views/Register.vue'
;
import
ChangePassword
from
'../views/ChangePassword.vue'
;
import
Main
from
'../views/Main.vue'
;
import
EditWorkList
from
'../components/EditWorkList.vue'
;
...
...
@@ -22,6 +23,10 @@ const routes = [{
name
:
'signup'
},
{
path
:
'/changePassword'
,
component
:
ChangePassword
,
name
:
'changePassword'
},
{
path
:
'/main'
,
component
:
Main
,
name
:
'main'
,
...
...
client/views/ChangePassword.vue
0 → 100644
View file @
761f6ecc
<
template
>
<v-app
id=
"inspire"
>
<auth-header
btnToProp=
"signin"
btnLabel=
"Register.loginBtn"
btnIconName=
"mdi-login"
></auth-header>
<v-content>
<v-container
fluid
class=
"align-center fill-height backgroundImg"
>
<v-row
justify=
"center"
class=
"loginCard"
>
<v-col
xs=
"8"
sm=
"6"
md=
"4"
lg=
"3"
>
<v-card
class=
"elevation-12 roundedCard"
light
elevation=
"24"
>
<v-toolbar
color=
"rgb(94, 181, 177,.85)"
dark
>
<v-icon
class=
"ma-3"
>
mdi-lock-reset
</v-icon>
<v-toolbar-title>
{{
$t
(
'ChangePassword.formHeader'
)
}}
</v-toolbar-title>
</v-toolbar>
<v-card-text>
<v-form>
<v-container
fluid
class=
"flex-wrap"
>
<v-row>
<v-col
cols=
"12"
>
<v-text-field
:label=
"$t('ChangePassword.username')"
prepend-icon=
"mdi-account-circle"
:rules=
"[rules.required]"
v-model=
"username"
ref=
"usernameTextField"
persistent-hint
:hint=
"this.usernameAlert?`$
{$t('ChangePassword.usernameAlert')}`:''"
@keyup.enter="changePassword()"
/>
</v-col>
<v-col
cols=
"12"
>
<v-text-field
:type=
"!showPassword1?'password' :'text'"
:label=
"$t('ChangePassword.oldPassword')"
prepend-icon=
"mdi-lock"
@
click:append=
"showPassword1 = !showPassword1"
:append-icon=
"showPassword1 ? 'mdi-eye': 'mdi-eye-off'"
v-model=
"oldPass"
:rules=
"[rules.required, rules.min]"
ref=
"oldPassTextField"
persistent-hint
:hint=
"this.oldPassAlert?`$
{$t('ChangePassword.oldPasswordAlert')}`:''"
@keyup.enter="changePassword()"
/>
</v-col>
<v-col
cols=
"12"
>
<v-text-field
:type=
"!showPassword2?'password' :'text'"
:label=
"$t('ChangePassword.newPassword')"
prepend-icon=
"mdi-lock"
@
click:append=
"showPassword2 = !showPassword2"
:append-icon=
"showPassword2 ? 'mdi-eye': 'mdi-eye-off'"
v-model=
"newPass"
:rules=
"[rules.required, rules.matchPass]"
ref=
"newPassTextField"
persistent-hint
:hint=
"this.newPassAlert?`$
{$t('ChangePassword.newPasswordAlert')}`:''"
@keyup.enter="changePassword()"
/>
</v-col>
</v-row>
</v-container>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
style=
"width:100%"
class=
"white--text"
color=
"rgb(94, 181, 177,.85)"
rounded
:loading=
"loading"
:disabled=
"loading"
@
click=
"changePassword()"
>
<v-icon
left
>
mdi-lock-question
</v-icon>
<small>
{{
$t
(
'ChangePassword.changePasswordBtn'
)
}}
</small>
<template
v-slot:loader
>
<span>
{{
$t
(
'ChangePassword.loadingText'
)
}}
</span>
</
template
>
</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
<ul
class=
"bubble-boxes"
>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<v-snackbar
v-model=
"snackbar"
:color=
"snackbarColor"
:timeout=
"2000"
>
{{ snackbarText }}
</v-snackbar>
</v-container>
</v-content>
<app-footer></app-footer>
</v-app>
</template>
<
script
>
import
AppFooter
from
"../components/AppFooter.vue"
;
import
AuthHeader
from
"../components/AuthHeader.vue"
;
import
{
Accounts
}
from
"meteor/accounts-base"
;
import
{
Meteor
}
from
"meteor/meteor"
;
export
default
{
components
:
{
"app-footer"
:
AppFooter
,
"auth-header"
:
AuthHeader
},
data
()
{
return
{
snackbar
:
false
,
snackbarText
:
""
,
snackbarColor
:
"red"
,
loading
:
false
,
username
:
null
,
usernameAlert
:
false
,
oldPass
:
null
,
oldPassAlert
:
false
,
newPass
:
null
,
newPassAlert
:
false
,
showPassword1
:
false
,
showPassword2
:
false
,
rules
:
{
required
:
value
=>
!!
value
||
this
.
$t
(
"ChangePassword.required"
),
min
:
v
=>
{
if
(
v
==
undefined
)
return
true
;
return
v
.
length
>=
8
||
this
.
$t
(
"ChangePassword.min8Character"
);
},
matchPass
:
v
=>
{
return
(
this
.
oldPass
!==
this
.
newPass
||
this
.
$t
(
"ChangePassword.matchPass"
)
);
}
}
};
},
methods
:
{
changePassword
()
{
const
that
=
this
;
if
(
this
.
username
==
null
||
this
.
username
.
length
==
0
)
{
this
.
$refs
.
usernameTextField
.
focus
();
this
.
usernameAlert
=
true
;
return
;
}
if
(
this
.
oldPass
==
null
||
this
.
oldPass
.
length
==
0
)
{
this
.
$refs
.
oldPassTextField
.
focus
();
this
.
oldPassAlert
=
true
;
return
;
}
if
(
this
.
newPass
==
null
||
this
.
newPass
.
length
==
0
)
{
this
.
$refs
.
newPassTextField
.
focus
();
this
.
newPassAlert
=
true
;
return
;
}
if
(
this
.
oldPass
==
this
.
newPass
)
{
return
;
}
this
.
loading
=
true
;
Meteor
.
call
(
"changePass"
,
this
.
username
,
this
.
oldPass
,
this
.
newPass
,
function
(
error
,
result
)
{
if
(
error
)
{
that
.
loading
=
false
;
if
(
error
.
error
==
"NotFoundUser"
)
{
that
.
snackbarColor
=
"red"
;
that
.
snackbarText
=
that
.
$t
(
"ChangePassword.NotFoundUser"
);
that
.
snackbar
=
true
;
return
;
}
if
(
error
.
error
==
"CheckPassError"
)
{
that
.
snackbarColor
=
"red"
;
that
.
snackbarText
=
that
.
$t
(
"ChangePassword.CheckPassError"
);
that
.
snackbar
=
true
;
return
;
}
that
.
snackbarColor
=
"red"
;
that
.
snackbarText
=
that
.
$t
(
"ChangePassword.internalServerError"
);
that
.
snackbar
=
true
;
return
;
}
Meteor
.
setTimeout
(()
=>
{
that
.
loading
=
false
;
that
.
snackbarColor
=
"rgb(94, 181, 177,.85)"
;
that
.
snackbarText
=
that
.
$t
(
"ChangePassword.SuccessChangePass"
);
that
.
snackbar
=
true
;
},
1000
);
}
);
}
}
};
</
script
>
<
style
scoped
>
.backgroundImg
{
background-color
:
#abdae4
ad
;
background-image
:
linear-gradient
(
141deg
,
#9fb8ad
0%
,
#1fc8db
51%
,
#2ce8ce
b0
75%
);
}
img
{
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
100%
;
width
:
100%
;
overflow-y
:
hidden
;
opacity
:
0.6
;
filter
:
grayscale
(
0.5
)
blur
(
2px
);
z-index
:
0
;
}
.loginCard
{
z-index
:
1
;
}
.backgroundImg
{
overflow-y
:
hidden
;
}
.roundedCard
{
border-radius
:
20px
;
}
/* loader */
@-moz-keyframes
loader
{
from
{
transform
:
rotate
(
0
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
@-webkit-keyframes
loader
{
from
{
transform
:
rotate
(
0
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
@-o-keyframes
loader
{
from
{
transform
:
rotate
(
0
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
@keyframes
loader
{
from
{
transform
:
rotate
(
0
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
</
style
>
\ No newline at end of file
client/views/Login.vue
View file @
761f6ecc
<
template
>
<v-content
class=
"fill-height"
>
<!--
<div
style=
"height:100%"
>
-->
<v-app
id=
"inspire"
>
<auth-header
btnToProp=
"signup"
btnLabel=
"Login.registerBtn"
btnIconName=
"mdi-account-plus"
></auth-header>
<v-container
fluid
class=
"align-center fill-height
backgroundImg"
>
<v-content>
<v-container
fluid
fill-height
class=
"align-center
backgroundImg"
>
<v-row
justify=
"center"
class=
"loginCard"
>
<v-col
xs=
"8"
sm=
"6"
md=
"4"
lg=
"3"
>
<v-card
class=
"elevation-12 roundedCard"
light
elevation=
"24"
>
...
...
@@ -11,17 +12,30 @@
<v-toolbar-title>
{{
$t
(
'Login.loginHeader'
)
}}
</v-toolbar-title>
</v-toolbar>
<v-card-text
class=
"d-flex align-center justify-center"
>
<v-img
src=
"/img/0.png"
contain
height=
"150"
width=
"150"
></v-img>
<v-img
src=
"/img/0.png"
contain
:height=
"$vuetify.breakpoint.mdAndUp?150:100"
:width=
"$vuetify.breakpoint.mdAndUp?150:100"
></v-img>
<v-form>
<v-container
fluid
>
<v-row>
<v-col
cols=
"12"
>
<v-text-field
:autofocus=
"usernameFocus"
:label=
"$t('Login.username')"
prepend-icon=
"mdi-account-circle"
:rules=
"[rules.required]"
v-model=
"username"
ref=
"usernameTextField"
:hint=
"this.usernameAlert?`$
{$t('Login.usernameAlert')}`:''"
@keyup.enter="loginUser()"
/>
</v-col>
<v-col
cols=
"12"
>
<v-text-field
:autofocus=
"passwordFocus"
:type=
"!showPassword?'password' :'text'"
:label=
"$t('Login.password')"
prepend-icon=
"mdi-lock"
...
...
@@ -31,7 +45,11 @@
:rules=
"[rules.required, rules.min]"
v-model=
"password"
ref=
"passwordTextField"
@
keyup
.
enter=
"loginUser()"
/>
</v-col>
</v-row>
</v-container>
</v-form>
</v-card-text>
<v-card-actions
class=
"flex-wrap"
>
...
...
@@ -47,7 +65,13 @@
<v-icon
left
>
mdi-login
</v-icon>
<small>
{{
$t
(
'Login.loginBtn'
)
}}
</small>
</v-btn>
<v-btn
text
rounded
color=
"green"
x-small
>
Change Password?
</v-btn>
<v-btn
text
rounded
color=
"green"
x-small
to=
"/changePassword"
>
{{
$t
(
'Login.changePassword'
)
}}
</v-btn>
</v-card-actions>
</v-card>
</v-col>
...
...
@@ -66,8 +90,10 @@
</ul>
<v-snackbar
v-model=
"snackbar"
:color=
"snackbarColor"
:timeout=
"2000"
>
{{
snackbarText
}}
</v-snackbar>
</v-container>
<app-footer></app-footer>
</v-content>
<app-footer></app-footer>
<!--
</div>
-->
</v-app>
</
template
>
<
script
>
...
...
@@ -80,6 +106,12 @@ export default {
"app-footer"
:
AppFooter
,
"auth-header"
:
AuthHeader
},
mounted
()
{
let
self
=
this
;
this
.
username
=
null
;
this
.
password
=
null
;
},
data
()
{
return
{
loading
:
false
,
...
...
@@ -134,6 +166,7 @@ export default {
that
.
snackbar
=
true
;
}
}
else
{
Meteor
.
call
(
"Fetchworklist"
,
"ratio"
);
Meteor
.
setTimeout
(()
=>
{
that
.
loading
=
false
;
that
.
$router
.
push
(
"/main/worklist"
);
...
...
@@ -145,6 +178,7 @@ export default {
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
debugger
;
// if (Meteor.userId()) {
// vm.$router.push("/main/worklist");
// }
...
...
@@ -188,7 +222,7 @@ img {
}
.loginCard
{
z-index
:
1
0
;
z-index
:
1
;
}
.backgroundImg
{
...
...
client/views/Main.vue
View file @
761f6ecc
<
template
>
<div
class=
"fill-height"
>
<v-app
id=
"inspire"
>
<!--
<div
style=
"height:100%"
>
-->
<!--
<v-content
class=
"fill-height"
>
-->
<template
v-if=
"!$vuetify.rtl"
>
...
...
@@ -79,7 +80,7 @@
<v-navigation-drawer
v-model=
"left"
fixed
temporary
></v-navigation-drawer>
<v-content
class=
"fill-height"
>
<v-container
class=
"fill-height"
fluid
>
<v-container
class=
"fill-height
align-start
"
fluid
>
<!-- <v-row justify="center" align="center">
<v-col class="shrink">
<v-tooltip right>
...
...
@@ -105,7 +106,7 @@
<span>Codepen</span>
</v-tooltip>
</v-col>
</v-row>
-->
</v-row>-->
<router-view></router-view>
</v-container>
</v-content>
...
...
@@ -113,8 +114,9 @@
<v-navigation-drawer
v-model=
"right"
fixed
right
temporary
></v-navigation-drawer>
<app-footer></app-footer>
</div
>
<!-- </div> --
>
<!-- </v-content> -->
</v-app>
</template>
<
script
>
...
...
client/views/Register.vue
View file @
761f6ecc
<
template
>
<!--
<div
class=
"fill-height"
>
-->
<v-content
class=
"fill-height"
>
<v-app
id=
"inspire"
>
<auth-header
btnToProp=
"signin"
btnLabel=
"Register.loginBtn"
btnIconName=
"mdi-login"
></auth-header>
<v-content>
<v-container
fluid
class=
"align-center fill-height backgroundImg"
>
<v-row
justify=
"center"
class=
"loginCard"
>
<v-col
xs=
"8"
sm=
"6"
md=
"4"
lg=
"3"
>
...
...
@@ -12,6 +12,9 @@
</v-toolbar>
<v-card-text>
<v-form>
<v-container
fluid
>
<v-row>
<v-col
cols=
"12"
>
<v-text-field
:label=
"$t('Register.username')"
prepend-icon=
"mdi-account-circle"
...
...
@@ -19,7 +22,10 @@
v-model=
"username"
ref=
"usernameTextField"
:hint=
"this.usernameAlert?`$
{$t('Register.usernameAlert')}`:''"
@keyup.enter="createAccount()"
/>
</v-col>
<v-col
cols=
"12"
>
<v-text-field
:type=
"!showPassword1?'password' :'text'"
:label=
"$t('Register.password')"
...
...
@@ -29,8 +35,11 @@
v-model=
"firstPass"
:rules=
"[rules.required, rules.min]"
ref=
"firstPassTextField"
:hint=
"this.firstPassAlert?`$
{$t('Register.usernameAlert')}`:''"
:hint=
"this.firstPassAlert?`$
{$t('Register.firstPassAlert')}`:''"
@keyup.enter="createAccount()"
/>
</v-col>
<v-col
cols=
"12"
>
<v-text-field
:type=
"!showPassword2?'password' :'text'"
:label=
"$t('Register.repeatPassword')"
...
...
@@ -40,8 +49,12 @@
v-model=
"secondPass"
:rules=
"[rules.required, rules.matchPass]"
ref=
"secondPassTextField"
:hint=
"this.secondPassAlert?`$
{$t('Register.usernameAlert')}`:''"
:hint=
"this.secondPassAlert?`$
{$t('Register.secondPassAlert')}`:''"
@keyup.enter="createAccount()"
/>
</v-col>
</v-row>
</v-container>
</v-form>
</v-card-text>
<v-card-actions>
...
...
@@ -79,9 +92,9 @@
</ul>
<v-snackbar
v-model=
"snackbar"
:color=
"snackbarColor"
:timeout=
"2000"
>
{{ snackbarText }}
</v-snackbar>
</v-container>
<app-footer></app-footer>
</v-content>
<!-- </div> -->
<app-footer></app-footer>
</v-app>
</template>
<
script
>
...
...
@@ -123,7 +136,6 @@ export default {
},
methods
:
{
createAccount
()
{
debugger
;
const
username
=
this
.
username
;
const
password
=
this
.
firstPass
;
const
that
=
this
;
...
...
@@ -208,9 +220,10 @@ img {
}
.loginCard
{
z-index
:
1
0
;
z-index
:
1
;
}
.backgroundImg
{
overflow-y
:
hidden
;
}
...
...
imports/api/collections/worklist.js
0 → 100644
View file @
761f6ecc
import
{
Mongo
}
from
'meteor/mongo'
;
import
{
Meteor
}
from
'meteor/meteor'
;
let
Worklist
;
if
(
Meteor
.
isClient
||
Meteor
.
isCordova
)
{
Worklist
=
new
Mongo
.
Collection
(
'worklist'
)
}
if
(
Meteor
.
isServer
)
{
Worklist
=
new
Mongo
.
Collection
(
'worklist'
,
{
connection
:
null
})
}
export
default
Worklist
;
\ No newline at end of file
imports/api/methods/changePassword.js
0 → 100644
View file @
761f6ecc
import
{
Meteor
}
from
'meteor/meteor'
;
import
{
Accounts
}
from
'meteor/accounts-base'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
methods
({
'changePass'
(
username
,
oldPassword
,
newPassword
)
{
debugger
;
this
.
unblock
();
check
(
username
,
String
);
check
(
oldPassword
,
String
);
check
(
newPassword
,
String
);
const
user
=
Accounts
.
findUserByUsername
(
username
);
if
(
user
==
null
)
{
throw
new
Meteor
.
Error
(
"NotFoundUser"
);
}
// const digestOldPassword = sha256(oldPassword);
// const password = { digest: digestOldPassword, algorithm: 'sha-256' };
const
result
=
Accounts
.
_checkPassword
(
user
,
oldPassword
);
if
(
result
.
error
!=
null
)
{
throw
new
Meteor
.
Error
(
"CheckPassError"
);
}
Accounts
.
setPassword
(
user
.
_id
,
newPassword
);
},
});
\ No newline at end of file
imports/api/methods/worklist.js
View file @
761f6ecc
import
{
Meteor
}
from
'meteor/meteor'
;
import
{
check
}
from
'meteor/check'
;
import
{
Accounts
}
from
'meteor/accounts-base'
;
Accounts
.
onLogin
(
function
(
user
)
{
debugger
;
console
.
log
(
","
,
user
.
user
.
_id
)
});
// Accounts.onLogin(function(user) {
// debugger;
// console.log(",", user.user._id)
// });
import
Worklist
from
'../collections/worklist.js'
;
Meteor
.
methods
({
'Fetchworklist'
()
{
'Fetchworklist'
(
devicemap
)
{
debugger
;
check
(
devicemap
,
String
);
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
const
result
=
HTTP
.
call
(
'GET'
,
'http://192.168.4.105:2050/Broker/HISIntegration.svc/rest/Fetchworklist/ratio'
);
console
.
log
(
result
);
debugger
;
const
result
=
HTTP
.
call
(
'GET'
,
`http://192.168.0.156/Broker/HISIntegration.svc/rest/Fetchworklist/
${
devicemap
}
`
);
let
worklistHttp
=
JSON
.
parse
(
result
.
content
);
Worklist
.
remove
({
_userid
:
this
.
userId
,
_devicemap
:
devicemap
});
return
true
;
// worklist.forEach((patient) => {
// Worklist.insert({ PatientID: worklist.PatientID, _userid: worklist._userid, _devicemap: devicemap }, {
// $set: {
// ...patient
// }
// });
// })
worklistHttp
.
WorkListItems
.
forEach
((
patient
)
=>
{
Worklist
.
insert
({
...
patient
,
_userid
:
this
.
userId
,
_devicemap
:
devicemap
});
})
// worklist._userid = this.userId;
// worklist._devicemap = devicemap;
// Worklist.upsert({ _userid: worklist._userid, _devicemap: devicemap }, { $set: worklist });
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/worklist.js
0 → 100644
View file @
761f6ecc
import
Worklist
from
'../../collections/worklist.js'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
publish
(
"worklist"
,
function
(
devicemap
)
{
if
(
!
this
.
userId
)
{
return
this
.
ready
();
}
const
userid
=
this
.
userId
;
check
(
devicemap
,
String
);
// console.log(Worklist.find({ _userid: userid, _devicemap: devicemap }).fetch())
return
Worklist
.
find
({
_userid
:
userid
,
_devicemap
:
devicemap
},
{
fields
:
{
_devicemap
:
0
,
_userid
:
0
}
});
});
\ No newline at end of file
public/fonts/font.css
View file @
761f6ecc
...
...
@@ -12,7 +12,7 @@
font-family
:
Vazir
;
src
:
url('vazir-font-v18.0.0/Vazir.eot')
;
src
:
url('vazir-font-v18.0.0/Vazir.eot?#iefix')
format
(
'vazir-opentype'
),
url('vazir-font-v18.0.0/Vazir.woff')
format
(
'woff'
),
url('vazir-font-v18.0.0/Vazir.ttf')
format
(
'truetype'
);
font-weight
:
bold
;
/* font-weight: normal; */
font-style
:
normal
;
}
...
...
server/main.js
View file @
761f6ecc
import
{
Meteor
}
from
'meteor/meteor'
;
import
'../imports/api/methods/worklist.js'
;
import
'../imports/api/methods/changePassword.js'
;
import
'../imports/api/server/publications/worklist.js'
Meteor
.
startup
(()
=>
{
...
...
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