Git pull made

This commit is contained in:
Eudes Inácio
2021-11-05 10:19:41 +01:00
33 changed files with 461 additions and 2032 deletions
+15 -17
View File
@@ -1,5 +1,3 @@
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
/* ///<reference path="../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" /> */
import { Injectable } from "@angular/core";
@Injectable({
@@ -8,7 +6,7 @@ import { Injectable } from "@angular/core";
export class JsonStore {
/* createCollection(name, data) {
/* createCollection(name, data) {
var collectionName = name;
var addOptions = {
@@ -32,7 +30,7 @@ export class JsonStore {
console.log(err)
});
}
} */
getCollection(collectionName) {
@@ -50,11 +48,11 @@ export class JsonStore {
JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections)
/* WL.JSONStore.init(JSONStoreCollections)
.then(function () {
WL.Logger.debug('Find all colletion data');
console.log('Find all colletion data');
}).fail(function (err) {
WL.Logger.error(err);
@@ -66,8 +64,8 @@ export class JsonStore {
return JSON.parse(value);
});
return data
return data */
//return notificationData
}
@@ -90,7 +88,7 @@ export class JsonStore {
JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections)
/* WL.JSONStore.init(JSONStoreCollections)
.then(function () {
WL.Logger.debug('Find colletion data by id');
console.log('Find colletion data by id');
@@ -101,30 +99,30 @@ export class JsonStore {
}).fail(function (err) {
WL.Logger.error(err);
console.log(err)
});
}); */
}
replaceDocument(collectionName: string, document: any) {
/* var document = { Example of how identify the document to replace
/* 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) {
/* WL.JSONStore.get(collectionName).replace(document, options).then(function (numberOfDocsReplaced) {
console.log("JsonStore replace document sucess: ", numberOfDocsReplaced)
}).fail(function (error) {
console.log("JsonStore replace document error: ", error)
});
}); */
}
removeDocument(collectionName: any,query: any,) {
/* var query = { _id: 1 }; Exemple of query
var options = { exact: true };
WL.JSONStore.get(collectionName).remove(query, options).then(function (numberOfDocsRemoved) {
/* 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)
});
} */
}
}); */
}
}