Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phanchanra opened this issue Dec 25, 2019 · 0 comments
Open

Comments

@phanchanra
Copy link

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
        },
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant