Skip to content

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

Open
@phanchanra

Description

@phanchanra

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
        },
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions