Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jiloysss committed Mar 7, 2019
1 parent 0014ec7 commit 6b7a38c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
36 changes: 27 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions src/store/PosStore/syncInBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export async function itemSync(itemObject, store) {
let itemObjectResult = await store.itemStore.find(itemObject.syncObject.id);
let categoryId = "";


if (itemObject.syncObject.category !== "") {
let categoryIds = await store.categoryStore.searchLengthName(
itemObject.syncObject.category,
Expand Down Expand Up @@ -107,9 +108,10 @@ export async function itemSync(itemObject, store) {
: 0,
sku: itemObject.syncObject.sku !== null ? itemObject.syncObject.sku : "",
barcode:
itemObject.syncObject.barcode !== null
? itemObject.syncObject.barcode
: "",
itemObject.syncObject.barcode === null ||
itemObject.syncObject.barcode === undefined
? ""
: itemObject.syncObject.barcode,
colorAndShape: JSON.stringify([
{
color:
Expand All @@ -132,7 +134,8 @@ export async function itemSync(itemObject, store) {
itemObject.syncObject.favorite !== null
? itemObject.syncObject.favorite
: "",
category: categoryId,
category:
categoryId === null || categoryId === undefined ? "" : categoryId,
taxes: "[]",
dateUpdated: Date.now(),
syncStatus: true,
Expand Down Expand Up @@ -300,8 +303,8 @@ export async function attendantSync(attendantObject, store) {
let attendantObjectResult = await store.attendantStore.find(
attendantObject.syncObject.id,
);

if (attendantObjectResult) {

attendantObjectResult.edit({
_id: attendantObject.syncObject.id,
user_name:
Expand Down

0 comments on commit 6b7a38c

Please sign in to comment.