vue-meteor-tracker icon indicating copy to clipboard operation
vue-meteor-tracker copied to clipboard

Pub/Sub run in local it work fine but on server cloud not working?

Open phanchanra opened this issue 5 years ago • 0 comments
trafficstars

Hello, I have problem with publish and subscribe when run on local it work fine but I deploy on cloud server why it does not working. I don't know why? please help.

meteor: {
        $subscribe: {
            'pos.itemMovementAlert': function() {
                return [this.currentBranchId]
            },
        },

        productTransferNotify() {
            let items = ItemMovements.find({
                // toBranchId: this.currentBranchId,
                transferBranchId: this.currentBranchId,
                status: 'Open',
            }).fetch()
            console.log(items, this.currentBranchId)
            let data = []
            if (items && items.length) {
                items.forEach(o => {
                    let doc = {
                        title: `Product Transfer : ${o.refNo} | ${moment(o.tranDate).format(
            'DD/MM/YYYY'
          )} | ${o.total} ${this.baseCurrency}`,
                        // icon: 'fas fa-bell fa-lg',
                        route: {
                            name: 'PosItemMovementAcceptForm',
                            query: { moveId: o._id, actionType: 'Open' },
                        },
                    }
                    data.push(doc)
                })
            }
            return data
        },
    },

phanchanra avatar Dec 25 '19 02:12 phanchanra