Commit ec45d803 authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(search register): add search register and register panel to karname

parent dad06bb4
Pipeline #1056 passed with stage
in 91 minutes and 3 seconds
......@@ -49,13 +49,13 @@
<v-card-actions>
<v-row style="margin:auto">
<v-col cols="12" class="d-flex justify-center align-center flex-wrap">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openNewDialog">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openNewDialog">
<strong>{{$t("HISLink.newBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openEditDialog" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openEditDialog" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("HISLink.editBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="deleteSnackbar" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="deleteSnackbar" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("HISLink.deleteBtn")}}</strong>
</v-btn>
</v-col>
......
......@@ -69,13 +69,13 @@
<v-card-actions>
<v-row style="margin:auto">
<v-col cols="12" class="d-flex justify-center align-center flex-wrap">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openNewDialog">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openNewDialog">
<strong>{{$t("HISLink.newBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openEditDialog" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openEditDialog" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("HISLink.editBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="deleteSnackbar" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="deleteSnackbar" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("HISLink.deleteBtn")}}</strong>
</v-btn>
</v-col>
......
......@@ -97,12 +97,12 @@
<v-card-actions>
<v-row style="margin:auto">
<v-col cols="12" class="d-flex justify-center align-center flex-wrap">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openNewDialog">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openNewDialog">
<strong>{{$t("HISLink.newBtn")}}</strong>
</v-btn>
<v-btn
color="rgb(94, 181, 177,.85)"
class="white--text"
class="white--text ma-1"
@click="openEditDialog"
:disabled="this.selectedItemInTable.length == 0"
>
......@@ -110,7 +110,7 @@
</v-btn>
<v-btn
color="rgb(94, 181, 177,.85)"
class="white--text"
class="white--text ma-1"
@click="deleteSnackbar"
:disabled="this.selectedItemInTable.length == 0"
>
......@@ -118,7 +118,7 @@
</v-btn>
<v-btn
color="rgb(94, 181, 177,.85)"
class="white--text"
class="white--text ma-1"
@click="activeHislink"
:disabled="this.selectedItemInTable.length == 0"
>
......@@ -126,7 +126,7 @@
</v-btn>
<v-btn
color="rgb(94, 181, 177,.85)"
class="white--text"
class="white--text ma-1"
@click="deactiveHislink"
:disabled="this.selectedItemInTable.length == 0"
>
......@@ -134,7 +134,7 @@
</v-btn>
<v-btn
color="rgb(94, 181, 177,.85)"
class="white--text"
class="white--text ma-1"
@click="authenticateHislink"
:disabled="this.selectedItemInTable.length == 0"
>
......@@ -142,7 +142,7 @@
</v-btn>
<v-btn
color="rgb(94, 181, 177,.85)"
class="white--text"
class="white--text ma-1"
@click="getWorklist"
:disabled="this.selectedItemInTable.length == 0"
>
......
This diff is collapsed.
......@@ -91,16 +91,16 @@
<v-card-actions>
<v-row style="margin:auto">
<v-col cols="12" class="d-flex justify-center align-center flex-wrap">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openNewDialog">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openNewDialog">
<strong>{{$t("HISLink.newBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openEditDialog" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openEditDialog" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("HISLink.editBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="openResetDialog" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="openResetDialog" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("Users.ResetPasswordBtn")}}</strong>
</v-btn>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="deleteSnackbar" :disabled="this.selectedItemInTable.length == 0">
<v-btn color="rgb(94, 181, 177,.85)" class="white--text ma-1" @click="deleteSnackbar" :disabled="this.selectedItemInTable.length == 0">
<strong>{{$t("HISLink.deleteBtn")}}</strong>
</v-btn>
</v-col>
......
......@@ -11,6 +11,10 @@ Vue.use(VueRouter);
import { Plugin } from 'vue-fragment'
Vue.use(Plugin);
import AsyncComputed from 'vue-async-computed';
Vue.use(AsyncComputed);
import routes from './plugins/routes';
const router = new VueRouter({
mode: 'history',
......
......@@ -165,7 +165,10 @@ const messages = {
},
RegisterRoute: {
HISLinkCombo: "HISLink",
ShowMoreBtn: "show more..."
searchBtn: "Search",
advancedSearchLabel: "Advanced search",
jsonParseError: "error in parse of given json",
dbError: "error in query, please edit query"
},
DataTableSearch: "search"
......@@ -332,7 +335,10 @@ const messages = {
},
RegisterRoute: {
HISLinkCombo: "درگاه HIS",
ShowMoreBtn: "بیشتر..."
searchBtn: "جستجو",
advancedSearchLabel: "جستجوی پیشرفته",
jsonParseError: "خطا در Parse عبارت وارد شده",
dbError: "خطا در query، لطفا query را اصلاح نمایید"
},
DataTableSearch: "جستجو"
......
......@@ -5,7 +5,6 @@ import internalWorklist from '../collections/internalworklist';
let collections = {};
if (Meteor.isServer) {
const result = HTTP.call('GET', `${Meteor.settings.worklistUrl}/HISIntegration.svc/rest/GetHISBrandsRest`);
let brandsHttpResult = JSON.parse(result.content);
......
......@@ -3,25 +3,62 @@ import { Mongo } from 'meteor/mongo'
import Collections from '../../collections/worklist4hislink.js';
import { Counts } from 'meteor/tmeasday:publish-counts';
Meteor.publish("worklist4hislink", function({ brand, limit }) {
Meteor.publish("worklist4hislink", function({ brand, limit, query }) {
if (brand == null) {
return [];
}
if (!this.userId) {
return this.ready();
}
const userid = this.userId;
check(brand, String);
check(limit, Number);
Counts.publish(this, 'brandCount', Collections[brand].find(), { noReady: true });
// let Worklist = new Mongo.Collection(brand);
// console.log(Worklist.find({ _userid: userid, _devicemap: devicemap }).fetch())
return Collections[brand].find({}, {
disableOplog: true,
// pollingThrottleMs: 1000,
pollingIntervalMs: 1000,
limit: limit
});
});
\ No newline at end of file
if (query == null)
query = {};
try {
// Counts.publish(this, 'brandCount', Collections[brand].find(query), { noReady: true, fastCount: true });
// else
// Counts.publish(this, 'brandCount', Collections[brand].find(), { noReady: true, fastCount: true });
// let Worklist = new Mongo.Collection(brand);
// console.log(Worklist.find({ _userid: userid, _devicemap: devicemap }).fetch())
// if (query == null)
// return Collections[brand].find({}, {
// disableOplog: true,
// // pollingThrottleMs: 1000,
// pollingIntervalMs: 1000,
// limit: limit
// });
// else
return Collections[brand].find(query, {
disableOplog: true,
// pollingThrottleMs: 1000,
pollingIntervalMs: 1000,
limit: limit
});
} catch (e) {
// Counts.publish(this, 'brandCount', Collections[brand].find({}), { noReady: false });
this.error(new Meteor.Error(e, 'error'));
return [];
}
});
Meteor.publish("brandCount", function({ brand, query }) {
if (query == null)
query = {}
if (brand == null) {
return [];
}
try {
Counts.publish(this, 'brandCount', Collections[brand].find(query), { fastCount: true });
} catch {
Counts.publish(this, 'brandCount', Collections[brand].find({}), { fastCount: true });
}
})
\ No newline at end of file
......@@ -13524,6 +13524,11 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
},
"vue-async-computed": {
"version": "3.8.2",
"resolved": "https://registry.npmjs.org/vue-async-computed/-/vue-async-computed-3.8.2.tgz",
"integrity": "sha512-If5roOhp/x0WWd0TWRD77YsuFoiIw3MbkcRlIB/FE3TqQCPje52eQp5CV5NN/7B0VAyPuGX5JQa+rc9AOcGAYw=="
},
"vue-fragment": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/vue-fragment/-/vue-fragment-1.5.1.tgz",
......@@ -13618,9 +13623,9 @@
"dev": true
},
"vuetify": {
"version": "2.1.15",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.1.15.tgz",
"integrity": "sha512-M35NJvlzkbCpFfsK08xraNvCpiNCIbYUXI/hkzjWHQV1MFIZnjrDTVtYoiudCyJ52zlrhWezAr4pzFOCLAr6RA=="
"version": "2.2.12",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.2.12.tgz",
"integrity": "sha512-rtNug+2I45p/ahEeY54nWM/8UyJ1LouS5CpwWjb6JaaMusE3GHD3FBwvb/FMyR+vWZkCxJpLIRfRT0cRpr/QJA=="
},
"vuetify-loader": {
"version": "1.3.0",
......
......@@ -25,13 +25,14 @@
"uuid": "^3.3.3",
"valid-url": "^1.0.9",
"vue": "^2.6.10",
"vue-async-computed": "^3.8.2",
"vue-fragment": "^1.5.1",
"vue-i18n": "^8.14.0",
"vue-meta": "^2.2.1",
"vue-meteor-tracker": "^2.0.0-beta.5",
"vue-router": "^3.1.2",
"vue-template-compiler": "^2.6.10",
"vuetify": "^2.1.15",
"vuetify": "^2.2.12",
"vuex": "^3.1.1"
},
"devDependencies": {
......
......@@ -19,6 +19,7 @@ import '../imports/api/server/publications/devicemap.js';
import '../imports/api/server/publications/users.js';
import '../imports/api/server/publications/worklist4hislink.js'
import { Accounts } from "meteor/accounts-base";
Meteor.startup(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment