mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Remove IBM push notification and jsonstore, added cordova notifications
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
|
||||
/* ///<reference path="../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" /> */
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
@Injectable({
|
||||
@@ -8,7 +8,7 @@ import { Injectable } from "@angular/core";
|
||||
|
||||
export class JsonStore {
|
||||
|
||||
createCollection(name, data) {
|
||||
/* createCollection(name, data) {
|
||||
|
||||
var collectionName = name;
|
||||
var addOptions = {
|
||||
@@ -108,7 +108,7 @@ export class JsonStore {
|
||||
replaceDocument(collectionName: string, document: any) {
|
||||
/* var document = { Example of how identify the document to replace
|
||||
_id: 1, json: {name: 'chevy', age: 23}
|
||||
}; */
|
||||
};
|
||||
var options = {};
|
||||
|
||||
WL.JSONStore.get(collectionName).replace(document, options).then(function (numberOfDocsReplaced) {
|
||||
@@ -119,12 +119,12 @@ export class JsonStore {
|
||||
}
|
||||
|
||||
removeDocument(collectionName: any,query: any,) {
|
||||
/* var query = { _id: 1 }; Exemple of query*/
|
||||
/* var query = { _id: 1 }; Exemple of query
|
||||
var options = { exact: true };
|
||||
WL.JSONStore.get(collectionName).remove(query, options).then(function (numberOfDocsRemoved) {
|
||||
console.log("JsonStore remove document sucess: ", numberOfDocsRemoved)
|
||||
}).fail(function (error) {
|
||||
console.log("JsonStore remove document erro: ", error)
|
||||
});
|
||||
}
|
||||
} */
|
||||
}
|
||||
Reference in New Issue
Block a user