Remove IBM push notification and jsonstore, added cordova notifications

This commit is contained in:
Eudes Inácio
2021-10-30 16:51:29 +01:00
parent cd88f49469
commit f61723599e
13 changed files with 165 additions and 473 deletions
+5 -5
View File
@@ -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)
});
}
} */
}