egg-born-module-a-base-sync
Advanced tools
Comparing version 4.8.27 to 4.8.28
@@ -78,3 +78,3 @@ const require3 = require('require3'); | ||
// notify | ||
this._notifyDrafts(); | ||
this._notifyDraftsDrafting(null, atomClass); | ||
// ok | ||
@@ -306,3 +306,3 @@ const key = { atomId, itemId }; | ||
// notify | ||
this._notifyDrafts(); | ||
this._notifyDraftsDrafting(null, atomClass); | ||
} | ||
@@ -395,4 +395,4 @@ // delete formal | ||
// notify | ||
this._notifyDrafts(user); | ||
this._notifyDraftsFlowing(user); | ||
this._notifyDraftsDrafting(user, atomClass); | ||
this._notifyDraftsFlowing(user, atomClass); | ||
} | ||
@@ -576,2 +576,3 @@ | ||
async flow({ key, atom: { atomFlowId } }) { | ||
const atomClass = await ctx.bean.atomClass.getByAtomId({ atomId: key.atomId }); | ||
await this.modelAtom.update({ | ||
@@ -584,4 +585,4 @@ id: key.atomId, | ||
const user = { id: item.userIdUpdated }; | ||
this._notifyDrafts(user); | ||
this._notifyDraftsFlowing(user); | ||
this._notifyDraftsDrafting(user, atomClass); | ||
this._notifyDraftsFlowing(user, atomClass); | ||
} | ||
@@ -588,0 +589,0 @@ |
@@ -57,5 +57,5 @@ const require3 = require('require3'); | ||
// notify | ||
this._notifyDrafts(user); | ||
this._notifyDraftsDrafting(user, atomClass); | ||
if (item.atomFlowId > 0) { | ||
this._notifyDraftsFlowing(user); | ||
this._notifyDraftsFlowing(user, atomClass); | ||
} | ||
@@ -125,3 +125,3 @@ // get formal atom | ||
// notify to change draft stats | ||
this._notifyDrafts(); | ||
this._notifyDraftsDrafting(null, atomClass); | ||
} | ||
@@ -294,2 +294,3 @@ // ok | ||
async _openDraft_update({ atomId, atomRevision, user }) { | ||
const atomClass = await ctx.bean.atomClass.getByAtomId({ atomId }); | ||
await this.modelAtom.update({ | ||
@@ -303,3 +304,3 @@ id: atomId, | ||
// notify | ||
this._notifyDrafts(); | ||
this._notifyDraftsDrafting(null, atomClass); | ||
} | ||
@@ -795,6 +796,7 @@ | ||
_notifyDrafts(user) { | ||
_notifyDraftsDrafting(user, atomClass) { | ||
ctx.bean.stats.notify({ | ||
module: moduleInfo.relativeName, | ||
name: 'drafts', | ||
name: 'draftsDrafting', | ||
nameSub: `${atomClass.module}_${atomClass.atomClassName}`, | ||
user, | ||
@@ -804,6 +806,7 @@ }); | ||
_notifyDraftsFlowing(user) { | ||
_notifyDraftsFlowing(user, atomClass) { | ||
ctx.bean.stats.notify({ | ||
module: moduleInfo.relativeName, | ||
name: 'draftsFlowing', | ||
nameSub: `${atomClass.module}_${atomClass.atomClassName}`, | ||
user, | ||
@@ -810,0 +813,0 @@ }); |
@@ -36,4 +36,3 @@ const versionManager = require('./bean/version.manager.js'); | ||
const beanAreaScope = require('./bean/bean.areaScope.js'); | ||
const statsDrafts = require('./bean/stats.drafts.js'); | ||
const statsDraftsFlowing = require('./bean/stats.draftsFlowing.js'); | ||
const statsDraftsCommon = require('./bean/stats.draftsCommon.js'); | ||
const statsStars = require('./bean/stats.stars.js'); | ||
@@ -209,10 +208,6 @@ const statsLabels = require('./bean/stats.labels.js'); | ||
// stats | ||
'stats.drafts': { | ||
'stats.draftsCommon': { | ||
mode: 'ctx', | ||
bean: statsDrafts, | ||
bean: statsDraftsCommon, | ||
}, | ||
'stats.draftsFlowing': { | ||
mode: 'ctx', | ||
bean: statsDraftsFlowing, | ||
}, | ||
'stats.stars': { | ||
@@ -219,0 +214,0 @@ mode: 'ctx', |
@@ -296,7 +296,16 @@ module.exports = app => { | ||
user: true, | ||
bean: 'drafts', | ||
bean: { | ||
module: 'a-stats', | ||
name: 'deps', | ||
}, | ||
inheritNameSub: true, | ||
dependencies: ['a-base:draftsDrafting', 'a-base:draftsFlowing'], | ||
}, | ||
draftsDrafting: { | ||
user: true, | ||
bean: 'draftsCommon', | ||
}, | ||
draftsFlowing: { | ||
user: true, | ||
bean: 'draftsFlowing', | ||
bean: 'draftsCommon', | ||
}, | ||
@@ -303,0 +312,0 @@ stars: { |
{ | ||
"name": "egg-born-module-a-base-sync", | ||
"version": "4.8.27", | ||
"version": "4.8.28", | ||
"title": "Base", | ||
@@ -5,0 +5,0 @@ "eggBornModule": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3603202
59664