Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPS Observation App DEPRECATED
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPS Observation App DEPRECATED
Commits
33ec86c2
Commit
33ec86c2
authored
4 years ago
by
Bhabesh Bhabani Mukhopadhyay
Browse files
Options
Downloads
Patches
Plain Diff
Configure two way sync for observation
Login and Observation List configured with two way sync for observation
parent
db4ccf45
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/LoginSystem.vue
+1
-0
1 addition, 0 deletions
src/components/LoginSystem.vue
src/components/ObservationList.vue
+8
-3
8 additions, 3 deletions
src/components/ObservationList.vue
src/components/Sync.vue
+1
-1
1 addition, 1 deletion
src/components/Sync.vue
with
10 additions
and
4 deletions
src/components/LoginSystem.vue
+
1
−
0
View file @
33ec86c2
...
@@ -149,6 +149,7 @@ export default {
...
@@ -149,6 +149,7 @@ export default {
/** Calling of Sync */
/** Calling of Sync */
//this.isSyncNeeded = true;
//this.isSyncNeeded = true;
this
.
$refs
.
Sync
.
isSyncOnewayNeeded
(
loggedUser
);
this
.
$refs
.
Sync
.
isSyncOnewayNeeded
(
loggedUser
);
this
.
$refs
.
Sync
.
syncTwoWayAtLogin
();
localStorage
.
setItem
(
CommonUtil
.
CONST_STORAGE_USER_DETAIL
,
JSON
.
stringify
(
loggedUser
));
localStorage
.
setItem
(
CommonUtil
.
CONST_STORAGE_USER_DETAIL
,
JSON
.
stringify
(
loggedUser
));
this
.
getUserFromStorage
();
this
.
getUserFromStorage
();
$
(
'
.offcanvas-collapse
'
).
removeClass
(
'
open
'
);
$
(
'
.offcanvas-collapse
'
).
removeClass
(
'
open
'
);
...
...
This diff is collapsed.
Click to expand it.
src/components/ObservationList.vue
+
8
−
3
View file @
33ec86c2
...
@@ -20,13 +20,16 @@
...
@@ -20,13 +20,16 @@
<p
class=
"text-danger"
>
You don't have any observations.
</p>
<p
class=
"text-danger"
>
You don't have any observations.
</p>
</div>
</div>
<common-util
ref=
"CommonUtil"
/>
<common-util
ref=
"CommonUtil"
/>
<sync
ref=
"Sync"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
CommonUtil
from
'
@/components/CommonUtil
'
import
CommonUtil
from
'
@/components/CommonUtil
'
import
Sync
from
'
@/components/Sync
'
import
{
DateTime
}
from
'
luxon
'
import
{
DateTime
}
from
'
luxon
'
export
default
{
export
default
{
name
:
"
ObservationList
"
,
name
:
"
ObservationList
"
,
data
()
{
data
()
{
...
@@ -36,12 +39,12 @@ export default {
...
@@ -36,12 +39,12 @@ export default {
observations
:
undefined
,
observations
:
undefined
,
};
};
},
},
components
:
{
CommonUtil
},
components
:
{
CommonUtil
,
Sync
},
methods
:
{
methods
:
{
/** TODO
/** TODO
* This function need to be shifted for two way sync process
* This function need to be shifted for two way sync process
*/
*/
fetchFromServer
()
/*
fetchFromServer()
{
{
let strUUID = localStorage.getItem(CommonUtil.CONST_STORAGE_UUID);
let strUUID = localStorage.getItem(CommonUtil.CONST_STORAGE_UUID);
let jsonHeader = { Authorization: strUUID };
let jsonHeader = { Authorization: strUUID };
...
@@ -54,7 +57,7 @@ export default {
...
@@ -54,7 +57,7 @@ export default {
localStorage.setItem(CommonUtil.CONST_STORAGE_OBSERVATION_LIST,JSON.stringify(data));
localStorage.setItem(CommonUtil.CONST_STORAGE_OBSERVATION_LIST,JSON.stringify(data));
this.getObservationsFromStore();
this.getObservationsFromStore();
})
})
},
},
*/
getObservationsFromStore
()
getObservationsFromStore
()
{
{
let
strObservations
=
localStorage
.
getItem
(
CommonUtil
.
CONST_STORAGE_OBSERVATION_LIST
);
let
strObservations
=
localStorage
.
getItem
(
CommonUtil
.
CONST_STORAGE_OBSERVATION_LIST
);
...
@@ -71,6 +74,8 @@ export default {
...
@@ -71,6 +74,8 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
let
valueObj
=
{
"
name
"
:
CommonUtil
.
CONST_STORAGE_OBSERVATION_LIST
,
"
complete
"
:
false
};
this
.
$refs
.
Sync
.
syncObservationSendPrepare
(
valueObj
);
this
.
CONST_URL_DOMAIN
=
this
.
$refs
.
CommonUtil
.
getDomain
();
this
.
CONST_URL_DOMAIN
=
this
.
$refs
.
CommonUtil
.
getDomain
();
let
strUUID
=
localStorage
.
getItem
(
CommonUtil
.
CONST_STORAGE_UUID
);
let
strUUID
=
localStorage
.
getItem
(
CommonUtil
.
CONST_STORAGE_UUID
);
if
(
strUUID
)
if
(
strUUID
)
...
...
This diff is collapsed.
Click to expand it.
src/components/Sync.vue
+
1
−
1
View file @
33ec86c2
...
@@ -536,7 +536,7 @@ export default {
...
@@ -536,7 +536,7 @@ export default {
if
(
this
.
counterTwoWaySyncPOST
===
totalTwoWaySyncPOST
)
if
(
this
.
counterTwoWaySyncPOST
===
totalTwoWaySyncPOST
)
{
{
this
.
counterTwoWaySyncPOST
=
0
;
this
.
counterTwoWaySyncPOST
=
0
;
getObservationsFromServerTwowaySync
(
totalTwoWaySyncPOST
,
updatedObservation
);
this
.
getObservationsFromServerTwowaySync
(
totalTwoWaySyncPOST
,
updatedObservation
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment