orbitx-core-models 11.180.0 → 11.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/invoiceDocument.js +1 -1
- package/dist/helpers/ownActivity.js +4 -4
- package/dist/interfaces/tierConfig.interface.d.ts +1 -1
- package/dist/interfaces/tierConfig.interface.d.ts.map +1 -1
- package/dist/models/invoice.model.js +1 -1
- package/dist/models/monthlyTierSnapshot.model.js +1 -1
- package/dist/models/tierConfig.model.js +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ function createInvoiceDocuments({ stripe }) {
|
|
|
35
35
|
const CompanyModel = company_model_1.Company;
|
|
36
36
|
const CounterModel = counter_model_1.Counter;
|
|
37
37
|
const LeadLedgerModel = leadLedger_model_1.LeadLedger;
|
|
38
|
-
/** "INV-2026-0001": sequential across
|
|
38
|
+
/** "INV-2026-0001": sequential across ORBITXPRO, starting again each year. */
|
|
39
39
|
async function nextInvoiceNumber(at = new Date()) {
|
|
40
40
|
const year = at.getFullYear();
|
|
41
41
|
const counter = await CounterModel.findByIdAndUpdate(`invoiceNumber_${year}`, { $inc: { seq: 1 } }, { new: true, upsert: true });
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createOwnActivityController = createOwnActivityController;
|
|
7
7
|
/**
|
|
8
|
-
* A portal's own Activity log: everything done on its account, by its own users and by
|
|
8
|
+
* A portal's own Activity log: everything done on its account, by its own users and by ORBITXPRO staff (HIPAA: an
|
|
9
9
|
* account must be able to see everyone who touched its data). Shown only after Ops turns on the account's access
|
|
10
10
|
* (activityLogAccess). Shared by the Client and Partner backends:
|
|
11
11
|
* createOwnActivityController({ kind: "client" }) // Company accounts, logs filed under `company`
|
|
@@ -39,7 +39,7 @@ function createOwnActivityController({ kind }) {
|
|
|
39
39
|
const listActivity = (0, _http_1.catchAsync)(async (req, res, next) => {
|
|
40
40
|
const account = await Account.findById(accountIdOf(req)).select("activityLogAccess").lean();
|
|
41
41
|
if (!(account === null || account === void 0 ? void 0 : account.activityLogAccess)) {
|
|
42
|
-
return next(new errors_1.AppError("Your Activity log isn't turned on. Please ask
|
|
42
|
+
return next(new errors_1.AppError("Your Activity log isn't turned on. Please ask ORBITXPRO support to turn it on.", _http_1.HTTP.FORBIDDEN));
|
|
43
43
|
}
|
|
44
44
|
const q = req.query;
|
|
45
45
|
const page = Math.max(1, Number(q.page) || 1);
|
|
@@ -78,12 +78,12 @@ function createOwnActivityController({ kind }) {
|
|
|
78
78
|
.lean(),
|
|
79
79
|
ActivityLogModel.countDocuments(filter),
|
|
80
80
|
]);
|
|
81
|
-
//
|
|
81
|
+
// ORBITXPRO staff show by name and team; their work email and network address stay internal.
|
|
82
82
|
const items = rows.map((r) => {
|
|
83
83
|
var _a, _b, _c;
|
|
84
84
|
return ((_a = r.actor) === null || _a === void 0 ? void 0 : _a.kind) === kind
|
|
85
85
|
? r
|
|
86
|
-
: { ...r, actor: { kind: (_b = r.actor) === null || _b === void 0 ? void 0 : _b.kind, name: ((_c = r.actor) === null || _c === void 0 ? void 0 : _c.name) || "
|
|
86
|
+
: { ...r, actor: { kind: (_b = r.actor) === null || _b === void 0 ? void 0 : _b.kind, name: ((_c = r.actor) === null || _c === void 0 ? void 0 : _c.name) || "ORBITXPRO", team: "ORBITXPRO" }, ip: undefined };
|
|
87
87
|
});
|
|
88
88
|
res.status(_http_1.HTTP.OK).json({
|
|
89
89
|
success: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tierConfig.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/tierConfig.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"tierConfig.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/tierConfig.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -107,7 +107,7 @@ const invoiceSchema = new mongoose_1.Schema({
|
|
|
107
107
|
required: [true, "Total due is required"],
|
|
108
108
|
min: 0,
|
|
109
109
|
},
|
|
110
|
-
// The number printed on the invoice: "INV-2026-0001", sequential across
|
|
110
|
+
// The number printed on the invoice: "INV-2026-0001", sequential across ORBITXPRO per year.
|
|
111
111
|
invoiceNumber: {
|
|
112
112
|
type: String,
|
|
113
113
|
trim: true,
|