@admin-layout/timetracker-module-server 1.0.3-alpha.29 → 1.0.3-alpha.31
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/lib/index.js +38 -80
- package/lib/index.js.map +1 -1
- package/lib/interfaces/timerecord-repository.d.ts +4 -4
- package/lib/interfaces/timerecord-service.d.ts +2 -2
- package/lib/store/models/timerecords-model.d.ts +2 -6
- package/lib/store/repository/timerecord-repository.d.ts +5 -5
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1369,7 +1369,7 @@ exports.schema = schema;
|
|
|
1369
1369
|
|
|
1370
1370
|
"use strict";
|
|
1371
1371
|
__webpack_require__.r(__webpack_exports__);
|
|
1372
|
-
/* harmony default export */ __webpack_exports__["default"] = ("type TimeRecords {\n orgId: String\n userId: String\n timeRecords: [TimeRecord]\n}\n\ntype TimeRecord {\n id:
|
|
1372
|
+
/* harmony default export */ __webpack_exports__["default"] = ("#type TimeRecords {\n# orgId: String\n# userId: String\n# timeRecords: [TimeRecord]\n#}\n\ntype TimeRecord {\n id: ID\n startTime: DateTime\n endTime: DateTime\n taskId: String\n taskName: String\n description: String\n tags: [String]\n isBillable: Boolean\n projectId: String\n clientId: String\n userId: String\n orgId: String\n timesheetId: String\n editable: Boolean\n isPause: Boolean\n isTimeout: Boolean\n pauseStatus: [PauseStatus]\n}\n\ntype PauseStatus {\n pausedTime: DateTime\n restartTime: DateTime\n}\n\ninput PauseStatus_Input {\n pausedTime: DateTime\n restartTime: DateTime\n}\n\ninput TimeRecordRequest {\n userId: String\n startTime: DateTime\n endTime: DateTime\n taskName: String\n description: String\n tags: [String]\n isBillable: Boolean\n projectId: String\n clientId: String\n timesheetId: String\n isPause: Boolean\n isTimeout: Boolean\n pauseStatus: [PauseStatus_Input]\n}\n\n\"\"\"\n Subscription event for timer\n\"\"\"\nenum TimeRecordPubSubEvents {\n TimeRecordCreated\n TimeRecordUpdated\n TimeRecordStopped\n TimeRecordDeleted\n TimeRecordConfigurationUpdate\n}\n\ntype SubscriptionTimeRecord {\n mutation: TimeRecordPubSubEvents\n timeRecord: TimeRecord\n}\n\nextend type Query {\n getTimeRecords(userId: String): [TimeRecord] @addAccountContext\n getDurationTimeRecords(startTime: DateTime, endTime: DateTime, userId: String): [TimeRecord] @addAccountContext\n getPlayingTimeRecord: TimeRecord @addAccountContext\n}\n\nextend type Mutation {\n createTimeRecord(request: TimeRecordRequest): String @addAccountContext\n updateTimeRecord(recordId: String!, request: TimeRecordRequest): Boolean @addAccountContext\n removeTimeRecord(recordId: String!): Boolean @addAccountContext\n removeDurationTimeRecords(startTime: DateTime, endTime: DateTime, projectId: String): Boolean @addAccountContext\n}\n\nextend type Subscription {\n SubscribeToTimeTracker(orgName: String, userId: String): SubscriptionTimeRecord\n}\n");
|
|
1373
1373
|
|
|
1374
1374
|
/***/ }),
|
|
1375
1375
|
|
|
@@ -1469,13 +1469,12 @@ let TimeRecordService = class TimeRecordService {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
async createTimeRecord(userId, orgId, request) {
|
|
1471
1471
|
const data = await this.timeRecordRepository.createTimeRecord(userId, orgId, request);
|
|
1472
|
-
|
|
1473
|
-
if (timeRecord) {
|
|
1472
|
+
if (data) {
|
|
1474
1473
|
const record = {
|
|
1475
1474
|
orgName: data.orgId,
|
|
1476
|
-
userId:
|
|
1475
|
+
userId: data.userId,
|
|
1477
1476
|
mutation: "TimeRecordCreated" /* TimeRecordCreated */,
|
|
1478
|
-
timeRecord,
|
|
1477
|
+
timeRecord: data,
|
|
1479
1478
|
};
|
|
1480
1479
|
this.pubsub.publish("TimeRecordCreated" /* TimeRecordCreated */, { SubscribeToTimeTracker: record });
|
|
1481
1480
|
}
|
|
@@ -1483,13 +1482,12 @@ let TimeRecordService = class TimeRecordService {
|
|
|
1483
1482
|
}
|
|
1484
1483
|
async updateTimeRecord(userId, orgId, recordId, request) {
|
|
1485
1484
|
const data = await this.timeRecordRepository.updateTimeRecord(userId, orgId, recordId, request);
|
|
1486
|
-
|
|
1487
|
-
if (timeRecord) {
|
|
1485
|
+
if (data) {
|
|
1488
1486
|
const record = {
|
|
1489
1487
|
orgName: data.orgId,
|
|
1490
|
-
userId:
|
|
1488
|
+
userId: data.userId,
|
|
1491
1489
|
mutation: "TimeRecordUpdated" /* TimeRecordUpdated */,
|
|
1492
|
-
timeRecord,
|
|
1490
|
+
timeRecord: data,
|
|
1493
1491
|
};
|
|
1494
1492
|
this.pubsub.publish("TimeRecordUpdated" /* TimeRecordUpdated */, { SubscribeToTimeTracker: record });
|
|
1495
1493
|
}
|
|
@@ -1501,7 +1499,7 @@ let TimeRecordService = class TimeRecordService {
|
|
|
1501
1499
|
orgName: data.orgId,
|
|
1502
1500
|
userId: data.userId,
|
|
1503
1501
|
mutation: "TimeRecordDeleted" /* TimeRecordDeleted */,
|
|
1504
|
-
timeRecord: data
|
|
1502
|
+
timeRecord: data,
|
|
1505
1503
|
};
|
|
1506
1504
|
this.pubsub.publish("TimeRecordDeleted" /* TimeRecordDeleted */, { SubscribeToTimeTracker: record });
|
|
1507
1505
|
return true;
|
|
@@ -1719,6 +1717,7 @@ const PauseStatusSchema = new mongoose_1.Schema({
|
|
|
1719
1717
|
});
|
|
1720
1718
|
// ===> TimeRecord
|
|
1721
1719
|
const TimeRecordSchema = new mongoose_1.Schema({
|
|
1720
|
+
orgId: { type: String, index: true },
|
|
1722
1721
|
userId: { type: String, index: true },
|
|
1723
1722
|
startTime: { type: Date },
|
|
1724
1723
|
endTime: { type: Date, default: null },
|
|
@@ -1734,18 +1733,14 @@ const TimeRecordSchema = new mongoose_1.Schema({
|
|
|
1734
1733
|
pauseStatus: { type: [PauseStatusSchema] }
|
|
1735
1734
|
});
|
|
1736
1735
|
TimeRecordSchema.index({ endTime: 1, startTime: 1, userId: 1 });
|
|
1737
|
-
const TimeRecordsSchema = new mongoose_1.Schema({
|
|
1738
|
-
orgId: { type: String, index: true },
|
|
1739
|
-
timeRecords: [TimeRecordSchema],
|
|
1740
|
-
});
|
|
1741
1736
|
TimeRecordSchema.virtual('id').get(function () {
|
|
1742
1737
|
return this._id.toHexString();
|
|
1743
1738
|
});
|
|
1744
1739
|
TimeRecordSchema.set('toJSON', {
|
|
1745
1740
|
virtuals: true,
|
|
1746
1741
|
});
|
|
1747
|
-
|
|
1748
|
-
exports.TimeRecordsModelFunc = (db) => db.model('timerecords',
|
|
1742
|
+
TimeRecordSchema.set('toObject', { virtuals: true });
|
|
1743
|
+
exports.TimeRecordsModelFunc = (db) => db.model('timerecords', TimeRecordSchema);
|
|
1749
1744
|
|
|
1750
1745
|
|
|
1751
1746
|
/***/ }),
|
|
@@ -1937,7 +1932,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
1937
1932
|
exports.TimeRecordRepository = void 0;
|
|
1938
1933
|
const inversify_1 = __webpack_require__(/*! inversify */ "inversify");
|
|
1939
1934
|
const timerecords_model_1 = __webpack_require__(/*! ../models/timerecords-model */ "./src/store/models/timerecords-model.ts");
|
|
1940
|
-
const _ = __webpack_require__(/*! lodash */ "lodash");
|
|
1941
1935
|
let TimeRecordRepository = class TimeRecordRepository {
|
|
1942
1936
|
constructor(db, logger) {
|
|
1943
1937
|
this.logger = logger.child({ className: 'TimeRecordRepository' });
|
|
@@ -1948,13 +1942,13 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
1948
1942
|
userId = /.*/;
|
|
1949
1943
|
}
|
|
1950
1944
|
let match = {
|
|
1951
|
-
'
|
|
1945
|
+
'userId': userId,
|
|
1952
1946
|
};
|
|
1953
1947
|
if (from) {
|
|
1954
|
-
match = Object.assign(Object.assign({}, match), { '
|
|
1948
|
+
match = Object.assign(Object.assign({}, match), { 'startTime': { $gte: from } });
|
|
1955
1949
|
}
|
|
1956
1950
|
if (until) {
|
|
1957
|
-
match = Object.assign(Object.assign({}, match), { '
|
|
1951
|
+
match = Object.assign(Object.assign({}, match), { 'endTime': { $lte: until } });
|
|
1958
1952
|
}
|
|
1959
1953
|
const result = await this.timeRecordsModel.aggregate([
|
|
1960
1954
|
{
|
|
@@ -1962,56 +1956,35 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
1962
1956
|
orgId,
|
|
1963
1957
|
},
|
|
1964
1958
|
},
|
|
1965
|
-
{
|
|
1966
|
-
$unwind: '$timeRecords',
|
|
1967
|
-
},
|
|
1968
1959
|
{
|
|
1969
1960
|
$match: Object.assign({}, match),
|
|
1970
1961
|
},
|
|
1971
|
-
{
|
|
1972
|
-
$group: {
|
|
1973
|
-
_id: '$orgId',
|
|
1974
|
-
timeRecords: {
|
|
1975
|
-
$push: '$timeRecords',
|
|
1976
|
-
},
|
|
1977
|
-
},
|
|
1978
|
-
},
|
|
1979
|
-
{
|
|
1980
|
-
$project: {
|
|
1981
|
-
orgId: 1,
|
|
1982
|
-
timeRecords: 1,
|
|
1983
|
-
},
|
|
1984
|
-
},
|
|
1985
1962
|
]);
|
|
1986
1963
|
if (result.length === 0) {
|
|
1987
1964
|
return [];
|
|
1988
1965
|
}
|
|
1989
|
-
return result
|
|
1966
|
+
return result;
|
|
1990
1967
|
}
|
|
1991
1968
|
async getOrganizationTimeRecords(orgId) {
|
|
1992
|
-
const trackDoc = await this.timeRecordsModel.
|
|
1993
|
-
if (trackDoc
|
|
1994
|
-
return trackDoc
|
|
1969
|
+
const trackDoc = await this.timeRecordsModel.find({ orgId });
|
|
1970
|
+
if (trackDoc) {
|
|
1971
|
+
return trackDoc;
|
|
1995
1972
|
}
|
|
1996
1973
|
return [];
|
|
1997
1974
|
}
|
|
1998
1975
|
async getPlayingTimeRecord(userId, orgId) {
|
|
1999
|
-
const trackDoc = await this.timeRecordsModel.
|
|
1976
|
+
const trackDoc = await this.timeRecordsModel.find({ orgId });
|
|
2000
1977
|
if (trackDoc) {
|
|
2001
1978
|
let res;
|
|
2002
|
-
if (trackDoc
|
|
2003
|
-
res = trackDoc.
|
|
1979
|
+
if (trackDoc)
|
|
1980
|
+
res = trackDoc.find((tr) => tr.userId === userId && tr.endTime === null);
|
|
2004
1981
|
return res;
|
|
2005
1982
|
}
|
|
2006
1983
|
return null;
|
|
2007
1984
|
}
|
|
2008
1985
|
async createTimeRecord(userId, orgId, request) {
|
|
2009
1986
|
try {
|
|
2010
|
-
const response = await this.timeRecordsModel.
|
|
2011
|
-
upsert: true,
|
|
2012
|
-
new: true,
|
|
2013
|
-
projection: { userId, orgId, timeRecords: { $elemMatch: { startTime: request.startTime } } },
|
|
2014
|
-
});
|
|
1987
|
+
const response = await this.timeRecordsModel.create(Object.assign(Object.assign({}, request), { orgId, userId }));
|
|
2015
1988
|
return response.toObject();
|
|
2016
1989
|
}
|
|
2017
1990
|
catch (err) {
|
|
@@ -2022,21 +1995,12 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
2022
1995
|
try {
|
|
2023
1996
|
if (recordId === null || recordId === undefined)
|
|
2024
1997
|
throw new Error('TimeRecord id not specified!');
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
setRequest = Object.assign(Object.assign({}, setRequest), { [`timeRecords.$.${key}`]: value });
|
|
2028
|
-
});
|
|
2029
|
-
const response = await this.timeRecordsModel.findOneAndUpdate({ orgId, timeRecords: { $elemMatch: { _id: recordId } } }, {
|
|
2030
|
-
$set: Object.assign({}, setRequest),
|
|
1998
|
+
const response = await this.timeRecordsModel.findOneAndUpdate({ orgId, _id: recordId }, {
|
|
1999
|
+
$set: Object.assign({}, request),
|
|
2031
2000
|
}, {
|
|
2032
2001
|
new: true,
|
|
2033
|
-
projection: {
|
|
2034
|
-
userId,
|
|
2035
|
-
orgId,
|
|
2036
|
-
timeRecords: { $elemMatch: { _id: recordId } },
|
|
2037
|
-
},
|
|
2038
2002
|
});
|
|
2039
|
-
return response.toObject();
|
|
2003
|
+
return response === null || response === void 0 ? void 0 : response.toObject();
|
|
2040
2004
|
}
|
|
2041
2005
|
catch (err) {
|
|
2042
2006
|
throw new Error(err.message);
|
|
@@ -2044,15 +2008,11 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
2044
2008
|
}
|
|
2045
2009
|
async removeTimeRecord(userId, orgId, recordId) {
|
|
2046
2010
|
try {
|
|
2047
|
-
const result = await this.timeRecordsModel.
|
|
2048
|
-
|
|
2049
|
-
}, {
|
|
2050
|
-
$pull: { timeRecords: { _id: recordId } },
|
|
2051
|
-
});
|
|
2052
|
-
if (result.nModified !== 1) {
|
|
2011
|
+
const result = await this.timeRecordsModel.remove({ userId, orgId, _id: recordId });
|
|
2012
|
+
if (result.n !== 1) {
|
|
2053
2013
|
throw new Error('TimeRecord is not modified');
|
|
2054
2014
|
}
|
|
2055
|
-
return { userId, orgId,
|
|
2015
|
+
return { userId, orgId, _id: recordId };
|
|
2056
2016
|
}
|
|
2057
2017
|
catch (err) {
|
|
2058
2018
|
throw new Error(err.message);
|
|
@@ -2062,12 +2022,10 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
2062
2022
|
try {
|
|
2063
2023
|
const trackerDoc = await this.timeRecordsModel.find({ orgId });
|
|
2064
2024
|
if (trackerDoc && trackerDoc.length > 0) {
|
|
2065
|
-
const timeRecords = trackerDoc
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
}
|
|
2069
|
-
timeRecords,
|
|
2070
|
-
});
|
|
2025
|
+
const timeRecords = trackerDoc.filter((tr) => tr.startTime < startTime || tr.startTime > endTime || tr.projectId !== projectId);
|
|
2026
|
+
for (const record of timeRecords) {
|
|
2027
|
+
await this.timeRecordsModel.remove({ _id: record._id });
|
|
2028
|
+
}
|
|
2071
2029
|
return true;
|
|
2072
2030
|
}
|
|
2073
2031
|
return false;
|
|
@@ -2080,13 +2038,13 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
2080
2038
|
try {
|
|
2081
2039
|
await this.timeRecordsModel.updateMany({
|
|
2082
2040
|
orgId,
|
|
2083
|
-
}, { $set: { '
|
|
2041
|
+
}, { $set: { 'timesheetId': sheetId } }, {
|
|
2084
2042
|
multi: true,
|
|
2085
2043
|
arrayFilters: [
|
|
2086
2044
|
{
|
|
2087
|
-
'
|
|
2088
|
-
'
|
|
2089
|
-
'
|
|
2045
|
+
'startTime': { $gte: startDate },
|
|
2046
|
+
'endTime': { $lte: endDate },
|
|
2047
|
+
'timesheetId': null,
|
|
2090
2048
|
},
|
|
2091
2049
|
],
|
|
2092
2050
|
});
|
|
@@ -2100,11 +2058,11 @@ let TimeRecordRepository = class TimeRecordRepository {
|
|
|
2100
2058
|
try {
|
|
2101
2059
|
await this.timeRecordsModel.updateMany({
|
|
2102
2060
|
orgId,
|
|
2103
|
-
}, { $set: { '
|
|
2061
|
+
}, { $set: { 'timesheetId': null } }, {
|
|
2104
2062
|
multi: true,
|
|
2105
2063
|
arrayFilters: [
|
|
2106
2064
|
{
|
|
2107
|
-
'
|
|
2065
|
+
'timesheetId': sheetId,
|
|
2108
2066
|
},
|
|
2109
2067
|
],
|
|
2110
2068
|
});
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/config/config.ts","webpack:///./src/config/index.ts","webpack:///./src/constants/constants.ts","webpack:///./src/constants/index.ts","webpack:///./src/containers/containers.ts","webpack:///./src/containers/index.ts","webpack:///./src/index.ts","webpack:///./src/initialization/index.ts","webpack:///./src/initialization/service-initialization.ts","webpack:///./src/migration/approval_notification.ejs","webpack:///./src/migration/index.ts","webpack:///./src/migration/mail-template.ts","webpack:///./src/migration/submit_notification.ejs","webpack:///./src/module.ts","webpack:///./src/preferences/index.ts","webpack:///./src/preferences/permissions/index.ts","webpack:///./src/preferences/permissions/timing-permissions-contribution.ts","webpack:///./src/preferences/permissions/timing-roles-permission-overwrite.ts","webpack:///./src/preferences/settings/general-settings.ts","webpack:///./src/preferences/settings/index.ts","webpack:///./src/preferences/settings/payment-settings.ts","webpack:///./src/resolvers/index.ts","webpack:///./src/resolvers/timerecord-resolver.ts","webpack:///./src/resolvers/timesheet-resolver.ts","webpack:///./src/schema/common-schema.graphql","webpack:///./src/schema/index.ts","webpack:///./src/schema/timerecord-schema.graphql","webpack:///./src/schema/timesheet-schema.graphql","webpack:///./src/schema/timetracker-schema.graphql","webpack:///./src/services/index.ts","webpack:///./src/services/timerecord-service.ts","webpack:///./src/services/timesheet-service.ts","webpack:///./src/store/models/timerecords-model.ts","webpack:///./src/store/models/timesheets-model.ts","webpack:///./src/store/models/timetracker-model.ts","webpack:///./src/store/repository/index.ts","webpack:///./src/store/repository/timerecord-repository.ts","webpack:///./src/store/repository/timesheet-repository.ts","webpack:///external \"@adminide-stack/core\"","webpack:///external \"@common-stack/core\"","webpack:///external \"@common-stack/server-core\"","webpack:///external \"@vscode-alt/monaco-editor/esm/vs/nls\"","webpack:///external \"@workbench-stack/core\"","webpack:///external \"envalid\"","webpack:///external \"graphql-subscriptions\"","webpack:///external \"inversify\"","webpack:///external \"lodash\"","webpack:///external \"moment\"","webpack:///external \"mongoose\""],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;AClFA,sDAAsD;AACtD,8DAAmC;AAEnC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAEhB,cAAM,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hB,6BAAM,CAAC,iBAAU,CAAC,gBAAgB,CAAC;GAV3B,mBAAmB,CAgG/B;AAhGY,kDAAmB;;;;;;;;;;;;ACXhC,iD;;;;;;;;;;;ACAA,+C;;;;;;;;;;;ACAA,sD;;;;;;;;;;;ACAA,iE;;;;;;;;;;;ACAA,kD;;;;;;;;;;;ACAA,oC;;;;;;;;;;;ACAA,kD;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,qC","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","/* eslint-disable import/no-extraneous-dependencies */\nimport * as envalid from 'envalid';\n\nconst { str, num } = envalid;\n\nexport const config = envalid.cleanEnv(process.env, {\n MAIL_SEND_DEFAULT_EMAIL: str(),\n CLIENT_URL: str(),\n});\n","export * from './config';\n","export const DEFAULT_USER = '123';\nexport const DEFAULT_ORG = '123';\nexport const TYPES = {\n ITimeTrackerService: Symbol('ITimeTrackerService'),\n ITimeRecordService: Symbol('ITimeRecordService'),\n ITimesheetService: Symbol('ITimesheetService'),\n ITimeTrackerRepository: Symbol('ITimeTrackerRepository'),\n ITimeRecordRepository: Symbol('ITimeRecordRepository'),\n ITimesheetRepository: Symbol('ITimesheetRepository'),\n ITaskRepository: Symbol('ITaskRepository'),\n ITaskService: Symbol('ITaskService'),\n};\n\nexport const EmailTemplateCodes = {\n TIMESHEET_APPROVAL: 'TIMESHEET_APPROVAL_EMAIL_TEMPLATE',\n ENABLE_TIMETRACKER: 'ENABLE_TIMETRACKER_EMAIL_TEMPLATE',\n SUBMIT_TIME: 'SUBMIT_TIME_EMAIL_TEMPLATE',\n TIMETRACKING_STOP: 'TIMETRACKING_STOP_TEMPLATE',\n};\n\nexport enum IPreDefineAccountPermissions {\n // others\n viewOthersTimeTracker = 'organization.timetracker.others.view',\n createOthersTimeTracker = 'organization.timetracker.others.create',\n editOthersTimeTracker = 'organization.timetracker.others.edit',\n deleteOthersTimeTracker = 'organization.timetracker.others.delete',\n manageOthersTimeTracker = 'organization.timetracker.others.manage',\n\n // self\n viewSelfTimeTracker = 'organization.timetracker.self.view',\n createSelfTimeTracker = 'organization.timetracker.self.create',\n editSelfTimeTracker = 'organization.timetracker.self.edit',\n deleteSelfTimeTracker = 'organization.timetracker.self.delete',\n manageSelfTimeTracker = 'organization.timetracker.self.manage',\n}\n","export * from './constants';\n","import { ContainerModule, interfaces } from 'inversify';\nimport { TYPES } from '../constants';\nimport { TimeRecordService, TimesheetService } from '../services';\nimport { TimeRecordRepository, TimesheetRepository } from '../store/repository';\nimport { TimesheetApprovalMailTemplate, TimesheetSubmitMailTemplate } from '../migration';\n\nexport const timeTrackerModule: (settings: any) => ContainerModule = (setting) =>\n new ContainerModule((bind: interfaces.Bind) => {\n bind(TYPES.ITimeRecordRepository).to(TimeRecordRepository).inSingletonScope().whenTargetIsDefault();\n bind(TYPES.ITimesheetRepository).to(TimesheetRepository).inSingletonScope().whenTargetIsDefault();\n bind(TYPES.ITimeRecordService).to(TimeRecordService).inSingletonScope().whenTargetIsDefault();\n bind(TYPES.ITimesheetService).to(TimesheetService).inSingletonScope().whenTargetIsDefault();\n\n bind('MongodbMigration').to(TimesheetApprovalMailTemplate).whenTargetNamed(TimesheetApprovalMailTemplate.name);\n bind('MongodbMigration').to(TimesheetSubmitMailTemplate).whenTargetNamed(TimesheetSubmitMailTemplate.name);\n });\n","export * from './containers';\n","import { Feature } from '@common-stack/server-core';\nimport TimeTracker from './module';\n\nexport * from './constants';\nexport * from './store/repository';\nexport * from './store/models/timetracker-model';\n\nexport default new Feature(TimeTracker);\n","export * from './service-initialization';\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { IRegistryExtensions as RegistryExtensions, IConfigurationRegistry, IRegistry } from '@adminide-stack/core';\nimport * as ILogger from 'bunyan';\nimport { TYPES as serverTypes, Schemas } from '@workbench-stack/core';\nimport { CommonType } from '@common-stack/core';\nimport { interfaces } from 'inversify';\nimport { TimeTrackerContribution } from '../preferences';\n\nexport const mainLoadConfigurationPre = async (_, container: interfaces.Container) => {\n const logger = container.get<ILogger>(CommonType.LOGGER);\n logger.info('PRESTART START: -- load TimeTrackerContribution to registry');\n\n const registry = container.get<IRegistry>(serverTypes.IRegistry);\n const configurationRegistry = registry.as<IConfigurationRegistry>(RegistryExtensions.Configuration);\n configurationRegistry.registerConfiguration(TimeTrackerContribution);\n logger.info('PRESTART ENDS: -- load TimeTrackerContribution to registry');\n};\n","export default \"<html>\\n <head>\\n\\n </head>\\n\\n <body>\\n <h1> Timesheet has approved! </h1>\\n <p> Dear <%= name %>! </p>\\n <p> Your timesheet from <bold> <%= startDate %> </bold> to <bold> <%= endDate %> </bold> has been approved! </p>\\n You can see timesheet details <a href=\\\"<%= timesheet_url %>\\\" __target=\\\"blank\\\"> here </a>\\n\\n <br /> <br />\\n <p> If you have any problem, please <a href=\\\"<%= contact_url %>\\\"> Contact us </a></p>\\n </body>\\n</html>\";","export * from './mail-template'","/* eslint-disable max-classes-per-file */\nimport * as Logger from 'bunyan';\nimport { injectable, inject, tagged } from 'inversify';\nimport { IDatabaseMigration } from '@adminide-stack/core';\nimport { IMoleculerServiceName, IMailServiceAction, IMailerServicesendArgs } from '@container-stack/mailing-api';\nimport { CommonType, TaggedType } from '@common-stack/core';\nimport { CallingOptions, ServiceBroker } from 'moleculer';\nimport { EmailTemplateCodes } from '../constants';\nimport { config } from '../config';\n\nconst TimeApprovalTemplate = require('./approval_notification.ejs');\nconst TimeSubmitTemplate = require('./submit_notification.ejs');\n\n@injectable()\nexport class TimesheetApprovalMailTemplate implements IDatabaseMigration {\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n protected broker: ServiceBroker,\n @inject('Settings')\n @tagged(TaggedType.MICROSERVICE, true)\n private settings: any,\n ) { }\n\n get id() {\n return 'EmailTemplateCodes_05012021';\n }\n\n public async up(): Promise<void> {\n const requestData = {\n engine: 'ejs',\n code: EmailTemplateCodes.TIMESHEET_APPROVAL,\n description: 'Timesheet approved',\n html: TimeApprovalTemplate.default,\n text: 'Timesheet approved',\n name: 'Timesheet approval notification',\n topic: 'Timesheet approved.',\n };\n\n if (config.isDev) {\n await this.broker.waitForServices('MailService');\n }\n\n return this.callAction(\n IMailServiceAction.saveTemplate,\n { request: requestData },\n IMoleculerServiceName.MailService,\n );\n }\n\n private async callAction<T, P = any>(command: string, params?: P, topic?: string, opts?: CallingOptions) {\n return this.broker.call<T, P>(`${topic}.${command}@${this.settings.adminApiNamespace}`, params, opts);\n }\n}\n\n@injectable()\nexport class TimesheetSubmitMailTemplate implements IDatabaseMigration {\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n protected broker: ServiceBroker,\n @inject('Settings')\n @tagged(TaggedType.MICROSERVICE, true)\n private settings: any,\n ) { }\n\n get id() {\n return 'TimesheetSubmitMailTemplate_05012021';\n }\n\n public async up(): Promise<void> {\n const requestData = {\n engine: 'ejs',\n code: EmailTemplateCodes.SUBMIT_TIME,\n description: 'Timesheet submitted',\n html: TimeSubmitTemplate.default,\n text: 'Timesheet submitted',\n name: 'Timesheet submit notification',\n topic: 'Timesheet submitted.',\n };\n if (config.isDev) {\n await this.broker.waitForServices('MailService');\n }\n\n return this.callAction(\n IMailServiceAction.saveTemplate,\n { request: requestData },\n IMoleculerServiceName.MailService,\n );\n }\n\n private async callAction<T, P = any>(command: string, params?: P, topic?: string, opts?: CallingOptions) {\n return this.broker.call<T, P>(`${topic}.${command}@${this.settings.adminApiNamespace}`, params, opts);\n }\n}\n","export default \"<html>\\n <head>\\n\\n </head>\\n\\n <body>\\n <h1> Timesheet has submitted! </h1>\\n <p> Dear <%= name %>! </p>\\n <p> Your timesheet from <bold> <%= startDate %> </bold> to <bold> <%= endDate %> </bold> has been submitted! </p>\\n You can see timesheet details <a href=\\\"<%= timesheet_url %>\\\" __target=\\\"blank\\\"> here </a>\\n\\n <br /> <br />\\n <p> If you have any problem, please <a href=\\\"<%= contact_url %>\\\"> Contact us </a></p>\\n </body>\\n</html>\";","import { Feature } from '@common-stack/server-core';\nimport { interfaces } from 'inversify';\nimport { schema } from './schema';\nimport { timeTrackerModule } from './containers';\nimport { resolvers } from './resolvers';\nimport { TYPES } from './constants';\nimport { mainLoadConfigurationPre } from './initialization';\nimport { TimeTrackerRolesContribution, TimeTrackerRolesPermissionOverwrite } from './preferences';\n\nconst createServiceFunc = (container: interfaces.Container) => ({\n timeRecordService: container.get(TYPES.ITimeRecordService),\n timesheetService: container.get(TYPES.ITimesheetService),\n});\n\nexport default new Feature({\n schema,\n createResolversFunc: resolvers,\n createContainerFunc: [timeTrackerModule],\n createServiceFunc,\n preStartFunc: [mainLoadConfigurationPre],\n addPermissions: {\n createPermissions: [TimeTrackerRolesContribution],\n },\n rolesUpdate: {\n overwriteRolesPermissions: TimeTrackerRolesPermissionOverwrite,\n },\n});\n","export * from './settings';\nexport * from './permissions';\n","export * from './timing-permissions-contribution';\nexport * from './timing-roles-permission-overwrite';\n","import { ConfigurationScope, IPermissionType } from '@adminide-stack/core';\nimport * as nls from '@vscode-alt/monaco-editor/esm/vs/nls';\nimport { IRoles } from '@common-stack/server-core';\nimport { IPreDefineAccountPermissions } from '../../constants';\n\nconst extraParams = {\n type: 'string',\n enum: [IPermissionType.Allow, IPermissionType.Deny, IPermissionType.NotSet],\n default: IPermissionType.NotSet,\n scope: ConfigurationScope.WINDOW,\n};\nexport const TimeTrackerRolesContribution: IRoles<ConfigurationScope> = {\n // others\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.viewOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to view Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.viewOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to view Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.viewOthersTimeTracker,\n 'View an Time Tracker, Time Reports and Timesheet of others.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.createOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.createOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to create Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.createOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to create Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.createOthersTimeTracker,\n 'Create Time Tracker, Reports and Timesheet of other members.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.editOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.editOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to edit Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.editOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to edit Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.editOthersTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of other members',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.manageOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to manage Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.manageOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to manage Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.manageOthersTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of other members',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.deleteOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to delete Time Tracker and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.deleteOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to delete Time Tracker and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.deleteOthersTimeTracker,\n 'Delete Time Tracker and Timesheet of other members.',\n ),\n ...extraParams,\n },\n // self\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.viewSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to view Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.viewSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to view Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.viewSelfTimeTracker,\n 'View an Time Tracker, Time Reports and Timesheet of self',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.createSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.createSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to create Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.createSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to create Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.createSelfTimeTracker,\n 'Create Time Tracker, Reports and Timesheet of self.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.editSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.editSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to edit Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.editSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to edit Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.editSelfTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of self.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.manageSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to manage Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.manageSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to manage Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.manageSelfTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of self.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.deleteSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to delete Time Tracker and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.deleteSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to delete Time Tracker and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.deleteSelfTimeTracker,\n 'Delete Time Tracker and Timesheet of self.',\n ),\n ...extraParams,\n },\n};\n","import { IPermissionType, IApplicationRoles } from '@adminide-stack/core';\nimport { IPreDefineAccountPermissions } from '../../constants';\n\nexport const TimeTrackerRolesPermissionOverwrite = {\n [IApplicationRoles.OWNER]: {\n // self\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Allow,\n\n // others\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.ADMIN]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.ORGANIZATION_MANAGER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Allow,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.PROJECT_ADMIN]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.MEMBER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n [IApplicationRoles.PROJECT_VIEWER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n [IApplicationRoles.USER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n [IApplicationRoles.GUEST]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n};\n","import { ConfigurationScope, IConfigurationPropertySchema } from '@adminide-stack/core';\nimport { localize } from '@vscode-alt/monaco-editor/esm/vs/nls';\n// const localize = (id, defaultMessage) => defineMessages({\n// id,\n// defaultMessage,\n\n// });\nconst enum TimeFormat {\n ROUNDED_0_00_12 = 'h.mm A',\n ROUNDED_0_00_24 = 'H.mm',\n PRECISE_00_00_00_12 = 'hh:mm:ss A',\n PRECISE_00_00_00_24 = 'HH:mm:ss',\n ROUNDED_UP_00_00_12 = 'hh:mm A',\n ROUNDED_UP_00_00_24 = 'HH:mm',\n}\n\nconst enum GroupProjectsBy {\n CLIENT = 'Client',\n CATEGORY = 'Category',\n CUSTOM = 'Custom',\n}\nconst enum DateFormat {\n USFORMAT = 'MM-DD-YYYY',\n UKFORMAT = 'DD-MM-YYYY',\n ISOFORMAT = 'YYYY-MM-DD',\n}\n\nexport const enum WeekDay {\n SUN = 'Sunday',\n MON = 'Monday',\n TUE = 'Tuesday',\n WED = 'Wednesday',\n THU = 'Thursday',\n FRI = 'Friday',\n SAT = 'Saturday',\n}\n\nconst enum FristWeekOfTheYear {\n FIRST_DAY = 'Week containing first day of the year',\n FIRST_FULL_7DAY = 'First full seven-day week in January',\n FIRST_4_DAY = 'First four-day week in January',\n}\n\nconst enum TimeRoundingUpToValue {\n IN_MINUTES_15 = 15 * 60,\n IN_MINUTES_1 = 1 * 60,\n IN_MINUTES_5 = 5 * 60,\n IN_MINUTES_6 = 6 * 60,\n IN_MINUTES_10 = 10 * 60,\n IN_MINUTES_12 = 12 * 60,\n IN_MINUTES_30 = 30 * 60,\n IN_HOUR_1 = 1 * 60 * 60,\n IN_HOUR_4 = 4 * 60 * 60,\n}\n\nconst enum TimeRoundedType {\n ROUND_UP_TO = 'Round up to',\n ROUND_TO_NEAREST = 'Round to nearest',\n ROUND_DOWN_TO = 'Roudn down to',\n}\nexport const TimeTrackerProperties: { [path: string]: IConfigurationPropertySchema } = {\n // notifications\n 'timetracker.notifications.enableTimetrackerNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.timeTrackingNotification',\n 'Allow timetracker emails to be send',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n\n 'timetracker.notifications.timeTrackingNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.timeTrackingNotification',\n 'An email will be send when tracking is stopped by the system due to lack of user response',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.notifications.approvalNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.approvalNotifications',\n 'An email will be sent to me when my timesheet is approved',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.notifications.submitNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.submitNotifications',\n 'An email will be sent to me when team member submits time (Approval Managers only)',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n\n // Time Tracking\n 'timetracker.activity.autoStop': {\n type: 'number',\n default: 24,\n description: localize(\n 'timetracker.activity.autoStop',\n 'Tracking will stop once maximum tack length has been exceeded',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.activity.waitingTime': {\n type: 'number',\n default: 120,\n description: localize(\n 'timetracker.activity.waitingTime',\n 'Enable activity check on the time tracking to ask if you are still tracking after the choosen idle time (in seconds)',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.activity.maxTimeInADay': {\n type: 'number',\n default: 120,\n description: localize(\n 'timetracker.activity.maxTimeInADay',\n 'Enable activity check on the time tracking upto choosen max time in a day(in seconds). It can change upto 1440',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.timerecord.automaticLock': {\n type: 'string',\n default: null,\n description: localize(\n 'accountNotificationPrimaryEmail',\n 'Prevent regular users from editing their past time or adding new entries to past dates',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.billable': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.project.billable',\n 'When you create a project, make it billable so its time entries are set as billable by default.',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.project.daysAllowedToWork': {\n type: ['string'],\n default: [WeekDay.MON, WeekDay.TUE, WeekDay.WED, WeekDay.THU, WeekDay.FRI],\n enum: [WeekDay.MON, WeekDay.TUE, WeekDay.WED, WeekDay.THU, WeekDay.FRI, WeekDay.SAT, WeekDay.SUN],\n description: localize('timetracker.project.recurringDailyLimit', 'Select working day'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.firstDayOfTheWeek': {\n type: 'string',\n enum: [WeekDay.MON, WeekDay.TUE, WeekDay.WED, WeekDay.THU, WeekDay.FRI, WeekDay.SAT, WeekDay.SUN],\n default: WeekDay.MON,\n description: localize('timetracker.project.firstDayOfTheWeek', 'First day of the week'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.firstWeekOfTheyear': {\n type: 'string',\n enum: [FristWeekOfTheYear.FIRST_4_DAY, FristWeekOfTheYear.FIRST_FULL_7DAY, FristWeekOfTheYear.FIRST_DAY],\n default: FristWeekOfTheYear.FIRST_4_DAY,\n enumDescriptions: [\n localize(\n 'timetracker.project.firstWeekOfTheyear.FIRST_4_DAY',\n 'The week regarded to be the first week of the year is that which contains at least 4 days of the new year.',\n ),\n localize(\n 'timetracker.project.firstWeekOfTheyear.FIRST_FULL_7DAY',\n 'The week regarded as the first week of the year is that which contains 7 full days in the new year.',\n ),\n localize(\n 'timetracker.project.firstWeekOfTheyear.FIRST_DAY',\n 'The week regarded as the first week of the years is that which contains at least one-day of the new year.',\n ),\n ],\n description: localize(\n 'timetracker.project.firstWeekOfTheyear',\n 'You can set how you start or view the first calendar week of the year. This will be visible on Timetracker pages like \"Reports\" or \"Calender View\".',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.timeFormat': {\n type: 'string',\n enum: [\n TimeFormat.ROUNDED_0_00_12,\n TimeFormat.ROUNDED_0_00_24,\n TimeFormat.PRECISE_00_00_00_12,\n TimeFormat.PRECISE_00_00_00_24,\n TimeFormat.ROUNDED_UP_00_00_12,\n TimeFormat.ROUNDED_UP_00_00_24,\n ],\n default: TimeFormat.PRECISE_00_00_00_12,\n enumDescriptions: [\n localize('timetracker.project.timeFormat.ROUNDED_0_00_12', '\"0.00 AM/PM\" (12 hours rounded)'),\n localize('timetracker.project.timeFormat.ROUNDED_0_00_24', '\"0.00\" (24 hours rounded)'),\n localize(\n 'timetracker.project.timeFormat.PRECISE_00_00_00_12',\n '\"00:00:00 AM/PM\" (precise 12 hours format)',\n ),\n localize('timetracker.project.timeFormat.PRECISE_00_00_00_24', '\"13:00:00\" (precise 24 hours format)'),\n localize('timetracker.project.timeFormat.ROUNDED_UP_00_00_12', '\"00:00 AM/PM\" (rounded up)'),\n localize('timetracker.project.timeFormat.ROUNDED_UP_00_00_24', '\"13:00\" (rounded up)'),\n ],\n description: localize(\n 'timetracker.project.timeFormat',\n 'Select the format in which you want your entry represented',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.dateFormat': {\n type: 'string',\n enum: [DateFormat.USFORMAT, DateFormat.UKFORMAT, DateFormat.ISOFORMAT],\n default: DateFormat.USFORMAT,\n enumDescriptions: [\n localize('timetracker.project.dateFormat.USFORMAT', '\"MM-DD-YYYY\" (US standard)'),\n localize('timetracker.project.dateFormat.UKFORMAT', '\"DD-MM-YYYY\" (UK standard)'),\n localize('timetracker.project.dateFormat.ISOFORMAT', '\"YYYY-MM-DD\" (ISO FORMAT)'),\n ],\n description: localize(\n 'timetracker.project.dateFormat',\n 'Select the format in which you want your entry represented',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.roundedToNearest': {\n type: 'string',\n enum: [\n TimeRoundingUpToValue.IN_MINUTES_1,\n TimeRoundingUpToValue.IN_MINUTES_5,\n TimeRoundingUpToValue.IN_MINUTES_6,\n TimeRoundingUpToValue.IN_MINUTES_10,\n TimeRoundingUpToValue.IN_MINUTES_12,\n TimeRoundingUpToValue.IN_MINUTES_15,\n TimeRoundingUpToValue.IN_MINUTES_30,\n TimeRoundingUpToValue.IN_HOUR_1,\n TimeRoundingUpToValue.IN_HOUR_4,\n ],\n default: TimeRoundingUpToValue.IN_MINUTES_15,\n enumDescriptions: [\n localize('TimeRoundingUpToValue.IN_MINUTES_1', '1 minute'),\n localize('TimeRoundingUpToValue.IN_MINUTES_5', '5 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_6', '6 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_10', '10 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_12', '12 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_15', '15 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_30', '30 minutes'),\n localize('TimeRoundingUpToValue.IN_HOUR_1', '1 hour'),\n localize('TimeRoundingUpToValue.IN_HOUR_4', '4 hours'),\n ],\n description: localize('timetracker.project.roundedToNearest', 'Round to nearest selected minute/hour'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.roundedType': {\n type: 'string',\n enum: [TimeRoundedType.ROUND_UP_TO, TimeRoundedType.ROUND_TO_NEAREST, TimeRoundedType.ROUND_DOWN_TO],\n default: TimeRoundedType.ROUND_TO_NEAREST,\n enumDescriptions: [\n localize(\n 'timetracker.project.roundedType.ROUND_UP_TO',\n 'e.g. if you set the interval to 30min, a 26min entry will show up in report as 30min',\n ),\n localize(\n 'timetracker.project.roundedType.ROUND_TO_NEAREST',\n 'e.g. if you set theinterval to 30min, a 14min entry will up as 0min and 26min entry as 30min',\n ),\n localize(\n 'timetracker.project.roundedType.ROUND_DOWN_TO',\n 'e.g. if you set the interval to 30min, a 26min entry will show up in reports as 0min',\n ),\n ],\n description: localize('timetracker.project.roundedType', 'Select the time rounding type'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.report.timeRoundingInReports': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.report.timeRoundingInReports',\n 'Round time in reports up, down, or to nearest X minutes',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n // 'timetracker.project.favorites': {\n // type: 'boolean',\n // default: true,\n // description: localize(\n // 'timetracker.project.favorites',\n // 'Let people mark their most used projects as favorite so they appear at the top of their project list when tracking time.',\n // ),\n // scope: ConfigurationScope.RESOURCE,\n // },\n 'timetracker.project.groupingLabel': {\n type: 'string',\n default: GroupProjectsBy.CLIENT,\n enum: [GroupProjectsBy.CLIENT, GroupProjectsBy.CATEGORY, GroupProjectsBy.CUSTOM],\n description: localize(\n 'timetracker.project.groupingLabel',\n 'Group Project by clients or departments, you can change the lable to somethign else',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.pickerSpecialFilter': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.project.pickerSpecialFilter',\n 'Quickly find the right task in project picker by using the task@project syntax.',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.timerecord.screenshotsEnabled': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.timerecord.screenshotsEnabled',\n 'Generate screenshots every 5 minutes while the timer is running (desktop app only)',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.project.taskBillableEnabled': {\n type: 'boolean',\n default: false,\n description: localize('SubscribeToBillingNotifications', 'Subscribe to all billing changes'),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.project.taskRateEnabled': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.project.taskRateEnabled',\n 'Have a different rate depending on the task on a project, plus choose whether tasks are billable by default.',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.timeApprovalEnabled': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.project.timeApprovalEnabled',\n 'Your team can submit their weekly timehseets for review, which you can approve or reject',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.timeTrackingMode': {\n type: 'string',\n default: 'DEFAULT',\n description: localize('SubscribeToBillingNotifications', 'Subscribe to all billing changes'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.trackTimeDownToSecond': {\n type: 'boolean',\n description: localize('SubscribeToBillingNotifications', 'Subscribe to all billing changes'),\n default: true,\n scope: ConfigurationScope.WINDOW,\n },\n};\n","import { IConfigurationNode } from '@adminide-stack/core';\nimport { IConfigurationContributionNames } from '@admin-layout/timetracker-core';\nimport { TimeTrackerProperties } from './general-settings';\nimport { TrackerPaymentProperties } from './payment-settings';\n\nexport const TimeTrackerContribution: IConfigurationNode = {\n id: IConfigurationContributionNames.timeTracker,\n type: 'object',\n properties: { ...TimeTrackerProperties, ...TrackerPaymentProperties },\n};\n","import { ConfigurationScope, IConfigurationPropertySchema } from '@adminide-stack/core';\nimport { localize } from '@vscode-alt/monaco-editor/esm/vs/nls';\n\nconst enum PayPeriod {\n NONE = 'None',\n WEEKLY = 'Weekly',\n TWICE_PER_MONTH = 'Twice per month',\n BI_WEEKLY = 'Bi-weekly',\n MONTHLY = 'Monthly',\n}\n\nconst enum PayRate {\n HOURLY = 'Hourly',\n FIXED = 'Fixed',\n}\n\nconst enum ProcessPayment {\n MANUALLY = 'Manually',\n AUTOMATICALLY = 'Automatically',\n}\n\nexport const TrackerPaymentProperties: { [path: string]: IConfigurationPropertySchema } = {\n 'timetracker.user.payment.processPayments': {\n type: 'string',\n default: ProcessPayment.MANUALLY,\n enum: [ProcessPayment.MANUALLY, ProcessPayment.AUTOMATICALLY],\n enumDescriptions: [\n localize(\n 'timetracker.payment.processPayments.manually',\n 'When set manually, time need to be updated manually.',\n ),\n localize(\n 'timetracker.payment.processPayments.automatically',\n \"When set automatically, time is marked as 'paid' in our system and if you have payroll enabled, the payment will be send.\",\n ),\n ],\n description: localize(\n 'timetracker.payment.processPayments',\n 'Choose whether you want to manually send payments or have them automatically processed.',\n ),\n scope: ConfigurationScope.WINDOW,\n overridable: true,\n },\n 'timetracker.user.payment.sendPaymentAfter': {\n type: 'number',\n default: 0,\n description: localize(\n 'timetracker.payment.sendPaymentAfter',\n 'Number of days after pay period ends, you would like to send payments for timesheets. ',\n ),\n scope: ConfigurationScope.WINDOW,\n overridable: true,\n },\n\n 'timetracker.user.payment.payPeriod': {\n type: 'string',\n enum: [PayPeriod.NONE, PayPeriod.WEEKLY, PayPeriod.TWICE_PER_MONTH, PayPeriod.BI_WEEKLY, PayPeriod.MONTHLY],\n default: PayPeriod.NONE,\n description: localize('timetracker.payment.payPeriod', 'Pay Period'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.payType': {\n type: 'string',\n enum: [PayRate.HOURLY, PayRate.FIXED],\n default: PayRate.HOURLY,\n description: localize('timetracker.payment.payType', 'Pay type'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.billRate': {\n type: 'number',\n default: 0.0,\n description: localize('timetracker.payment.billRate', 'Billing Rate'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.payRate': {\n type: 'number',\n default: 0.0,\n description: localize('timetracker.payment.payRate', 'Paying Rate'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.requireTimesheetApproval': {\n type: 'boolean',\n default: false,\n description: localize('timetracker.payment.requireTimesheetApproval', 'Whether it requires Timesheet Approval'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n // User limits\n 'timetracker.user.recurringWeeklyLimit': {\n type: 'number',\n default: null,\n description: localize(\n 'timetracker.payment.recurringWeeklyLimit',\n 'Limits how much time can be tracked each week',\n ),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.recurringDailyLimit': {\n type: 'number',\n default: null,\n description: localize(\n 'timetracker.payment.recurringDailyLimit',\n 'Limits how much time can be tracked each day',\n ),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n};\n","import { resolver as timerecordResolver } from './timerecord-resolver';\nimport { resolver as timesheetResolver } from './timesheet-resolver';\n\nexport const resolvers = [timerecordResolver, timesheetResolver];\n","/* eslint-disable import/no-extraneous-dependencies */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable no-underscore-dangle */\nimport * as _ from 'lodash';\nimport { withFilter } from 'graphql-subscriptions';\nimport { ITimeRecordPubSubEvents } from '@admin-layout/timetracker-core';\n\nexport const resolver = (options) => ({\n TimeRecord: {\n id: (root) => root.id || root._id,\n },\n Query: {\n getTimeRecords: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Query.getTimeRecords) args %j', args);\n return timeRecordService.getTimeRecords(userContext.orgId, args.userId);\n },\n getDurationTimeRecords: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Query.getDurationTimeRecords) args %j', args);\n return timeRecordService.getDurationTimeRecords(userContext.orgId, args.startTime, args.endTime, args.userId);\n },\n getPlayingTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Query.getPlayingTimeRecord) args %j', args);\n return timeRecordService.getPlayingTimeRecord(user._id || user.sub, userContext.orgId);\n },\n },\n Mutation: {\n createTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.createTimeRecord) args %j', args);\n let { userId } = args.request;\n if (userId === undefined) userId = user._id || user.sub;\n return timeRecordService.createTimeRecord(userId, userContext.orgId, args.request);\n },\n updateTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.updateTimeRecord) args %j', args);\n let { userId } = args.request;\n if (userId === undefined) userId = user._id || user.sub;\n return timeRecordService.updateTimeRecord(userId, userContext.orgId, args.recordId, args.request);\n },\n removeTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.removeTimeRecord) args %j', args);\n const userId = user._id || user.sub;\n return timeRecordService.removeTimeRecord(userId, userContext.orgId, args.recordId);\n },\n removeDurationTimeRecords: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.removeDurationTimeRecords) args %j', args);\n const userId = user._id || user.sub;\n return timeRecordService.removeDurationTimeRecords(\n userId,\n userContext.orgId,\n args.startTime,\n args.endTime,\n args.projectId,\n );\n },\n },\n Subscription: {\n SubscribeToTimeTracker: {\n subscribe: withFilter(\n () =>\n options.pubsub.asyncIterator([\n ITimeRecordPubSubEvents.TimeRecordCreated,\n ITimeRecordPubSubEvents.TimeRecordUpdated,\n ITimeRecordPubSubEvents.TimeRecordDeleted,\n ]),\n async (payload, variables, context: {}) =>\n payload.SubscribeToTimeTracker.orgName === variables.orgName &&\n payload.SubscribeToTimeTracker.userId === variables.userId,\n ),\n },\n },\n});\n","/* eslint-disable no-underscore-dangle */\nexport const resolver = (options) => ({\n Query: {\n getTimesheets: (root, args, { timesheetService, userContext }) => {\n options.logger.trace('(Query.getTimeSheets) args %j', args);\n if (!args.withTotalHours) return timesheetService.getTimesheets(userContext.orgId);\n return timesheetService.getTimesheetsWithTotalHours(userContext.orgId);\n },\n getDurationTimesheets: (root, args, { timesheetService, userContext }) => {\n options.logger.trace('(Query.getDurationTimesheets) args %j', args);\n return timesheetService.getDurationTimesheets(userContext.orgId, args.start, args.end);\n },\n },\n\n Mutation: {\n createTimesheet: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.createTimesheet) args %j', args);\n return timesheetService.createTimesheet(user._id || user.sub, userContext.orgId, args.request);\n },\n updateTimesheet: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.updateTimesheet) args %j', args);\n return timesheetService.updateTimesheet(user._id || user.sub, userContext.orgId, args.sheetId, args.request, {\n ...userContext,\n username: user.name,\n });\n },\n removeTimesheet: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.removeTimesheet) args %j', args);\n return timesheetService.removeTimesheet(user._id || user.sub, userContext.orgId, args.sheetId);\n },\n updateTimesheetStatus: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.updateTimesheetStatus) args %j', args);\n return timesheetService.updateTimesheetStatus(userContext.orgId, args.sheetId, args.state);\n },\n },\n});\n","export default \"type Tag {\\n id: ID!\\n name: String\\n}\\n\\nenum StartYearWeekType {\\n FIRST_FOURDAY_WEEK\\n FIRST_FULL_WEEK\\n FIRST_DAY_WEEK\\n}\\n\\nextend type Query {\\n getTags: [Tag]\\n getSettings: Settings\\n}\\n\";","import timeRecordSchema from './timerecord-schema.graphql';\nimport timesheetSchema from './timesheet-schema.graphql';\nimport timeTrackerSchema from './timetracker-schema.graphql';\nimport commonSchema from './common-schema.graphql';\n\nconst schema = [timeRecordSchema, timesheetSchema, timeTrackerSchema, commonSchema].join('\\n');\n\nexport { schema };\n","export default \"type TimeRecords {\\n orgId: String\\n userId: String\\n timeRecords: [TimeRecord]\\n}\\n\\ntype TimeRecord {\\n id: String\\n startTime: DateTime\\n endTime: DateTime\\n taskId: String\\n taskName: String\\n description: String\\n tags: [String]\\n isBillable: Boolean\\n projectId: String\\n clientId: String\\n userId: String\\n orgId: String\\n timesheetId: String\\n editable: Boolean\\n isPause: Boolean\\n isTimeout: Boolean\\n pauseStatus: [PauseStatus]\\n}\\n\\ntype PauseStatus {\\n pausedTime: DateTime\\n restartTime: DateTime\\n}\\n\\ninput PauseStatus_Input {\\n pausedTime: DateTime\\n restartTime: DateTime\\n}\\n\\ninput TimeRecordRequest {\\n userId: String\\n startTime: DateTime\\n endTime: DateTime\\n taskName: String\\n description: String\\n tags: [String]\\n isBillable: Boolean\\n projectId: String\\n clientId: String\\n timesheetId: String\\n isPause: Boolean\\n isTimeout: Boolean\\n pauseStatus: [PauseStatus_Input]\\n}\\n\\n\\\"\\\"\\\"\\n Subscription event for timer\\n\\\"\\\"\\\"\\nenum TimeRecordPubSubEvents {\\n TimeRecordCreated\\n TimeRecordUpdated\\n TimeRecordStopped\\n TimeRecordDeleted\\n TimeRecordConfigurationUpdate\\n}\\n\\ntype SubscriptionTimeRecord {\\n mutation: TimeRecordPubSubEvents\\n timeRecord: TimeRecord\\n}\\n\\nextend type Query {\\n getTimeRecords(userId: String): [TimeRecord] @addAccountContext\\n getDurationTimeRecords(startTime: DateTime, endTime: DateTime, userId: String): [TimeRecord] @addAccountContext\\n getPlayingTimeRecord: TimeRecord @addAccountContext\\n}\\n\\nextend type Mutation {\\n createTimeRecord(request: TimeRecordRequest): String @addAccountContext\\n updateTimeRecord(recordId: String!, request: TimeRecordRequest): Boolean @addAccountContext\\n removeTimeRecord(recordId: String!): Boolean @addAccountContext\\n removeDurationTimeRecords(startTime: DateTime, endTime: DateTime, projectId: String): Boolean @addAccountContext\\n}\\n\\nextend type Subscription {\\n SubscribeToTimeTracker(orgName: String, userId: String): SubscriptionTimeRecord\\n}\\n\";","export default \"# scalar DateTime\\nenum TimesheetState {\\n OPEN\\n APPROVED_PENDING\\n APPROVED\\n APPROVED_FINALIZED # --- which means no going back\\n DENYED\\n SUBMITTED\\n DENYED_FINALIZED # --- which means no going back\\n}\\n\\ntype Timesheets {\\n orgId: String\\n userId: String\\n timesheets: [Timesheet]\\n}\\n\\ntype Timesheet {\\n id: ID\\n userId: String\\n startDate: DateTime\\n endDate: DateTime\\n state: TimesheetState\\n submittedOn: DateTime\\n approvedOn: DateTime\\n approvedBy: String\\n updatedBy: String # ---> userId\\n updatedOn: DateTime\\n timeRecordsId: [String]\\n}\\n\\ninput TimesheetCreateRequest {\\n userId: String\\n startDate: DateTime\\n endDate: DateTime\\n state: TimesheetState\\n submittedOn: DateTime\\n approvedOn: DateTime\\n approvedBy: String\\n updatedBy: String # ---> userId\\n updatedOn: DateTime\\n timeRecordsId: [String]\\n}\\n\\ntype TimesheetResponse {\\n id: ID\\n startDate: DateTime\\n endDate: DateTime\\n state: TimesheetState\\n submittedOn: DateTime\\n approvedOn: DateTime\\n approvedBy: String\\n updatedBy: String # ---> userId\\n updatedOn: DateTime\\n userId: String\\n orgId: String\\n totalDuration: Int\\n}\\n\\nextend type Query {\\n getTimesheets(userId: String, withTotalHours: Boolean): [TimesheetResponse] @addAccountContext\\n getDurationTimesheets(start: DateTime, end: DateTime): [TimesheetResponse] @addAccountContext\\n}\\n\\nextend type Mutation {\\n createTimesheet(request: TimesheetCreateRequest): Boolean @addAccountContext\\n updateTimesheet(sheetId: String, request: TimesheetCreateRequest): Boolean @addAccountContext\\n removeTimesheet(sheetId: String): Boolean @addAccountContext\\n updateTimesheetStatus(sheetId: String, state: TimesheetState): Boolean @addAccountContext\\n}\\n\";","export default \"type TimeTracker {\\n userId: String\\n orgId: String\\n timeRecords: [TimeRecord]\\n timesheets: [Timesheet]\\n}\\n\";","export * from './timesheet-service';\nexport * from './timerecord-service';\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable import/no-extraneous-dependencies */\nimport { CdmLogger } from '@cdm-logger/core';\nimport { inject, injectable } from 'inversify';\nimport { ITimeRecord, ITimeRecordRequest, ITimeRecordPubSubEvents } from '@admin-layout/timetracker-core';\nimport { ServerTypes, IPreferencesService } from '@adminide-stack/core';\nimport { PubSubEngine } from 'graphql-subscriptions';\nimport { ServiceBroker } from 'moleculer';\nimport { CommonType } from '@common-stack/core';\nimport { ITimeRecordRepository } from '../interfaces';\nimport { TYPES } from '../constants';\nimport { ITimeRecordService } from '../interfaces/timerecord-service';\n\n@injectable()\nexport class TimeRecordService implements ITimeRecordService {\n private logger: CdmLogger.ILogger;\n\n constructor(\n @inject(TYPES.ITimeRecordRepository)\n protected timeRecordRepository: ITimeRecordRepository,\n\n @inject(ServerTypes.IPreferenceEditorService)\n private preferencesService: IPreferencesService,\n\n @inject(CommonType.MOLECULER_BROKER)\n private broker: ServiceBroker,\n\n @inject('PubSub')\n private pubsub: PubSubEngine,\n\n @inject('Logger')\n logger: CdmLogger.ILogger,\n ) {\n this.logger = logger;\n }\n\n public async getTimeRecords(orgId: string, userId: string): Promise<Array<ITimeRecord>> {\n return this.timeRecordRepository.getTimeRecords(orgId, userId);\n }\n\n public async getDurationTimeRecords(\n orgId: string,\n startTime: Date,\n endTime: Date,\n userId?: string,\n ): Promise<Array<ITimeRecord>> {\n const timeRecords = await this.timeRecordRepository.getTimeRecords(orgId, userId, startTime, endTime);\n return timeRecords.filter((r) => r.endTime !== null);\n }\n\n public async getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord> {\n return this.timeRecordRepository.getPlayingTimeRecord(userId, orgId);\n }\n\n public async createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest) {\n const data = await this.timeRecordRepository.createTimeRecord(userId, orgId, request);\n const timeRecord = data?.timeRecords[0];\n if (timeRecord) {\n const record = {\n orgName: data.orgId,\n userId: timeRecord.userId,\n mutation: ITimeRecordPubSubEvents.TimeRecordCreated,\n timeRecord,\n };\n this.pubsub.publish(ITimeRecordPubSubEvents.TimeRecordCreated, { SubscribeToTimeTracker: record });\n }\n return (data as any)._id;\n }\n\n public async updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest) {\n const data = await this.timeRecordRepository.updateTimeRecord(userId, orgId, recordId, request);\n const timeRecord = data?.timeRecords[0];\n if (timeRecord) {\n const record = {\n orgName: data.orgId,\n userId: timeRecord.userId,\n mutation: ITimeRecordPubSubEvents.TimeRecordUpdated,\n timeRecord,\n };\n this.pubsub.publish(ITimeRecordPubSubEvents.TimeRecordUpdated, { SubscribeToTimeTracker: record });\n }\n return true;\n }\n\n public async removeTimeRecord(userId: string, orgId: string, recordId: string) {\n const data = await this.timeRecordRepository.removeTimeRecord(userId, orgId, recordId);\n const record = {\n orgName: data.orgId,\n userId: data.userId,\n mutation: ITimeRecordPubSubEvents.TimeRecordDeleted,\n timeRecord: data?.timeRecords[0],\n };\n this.pubsub.publish(ITimeRecordPubSubEvents.TimeRecordDeleted, { SubscribeToTimeTracker: record });\n return true;\n }\n\n public async removeDurationTimeRecords(\n userId: string,\n orgId: string,\n startTime: Date,\n endTime: Date,\n projectId: string,\n ) {\n return this.timeRecordRepository.removeDurationTimeRecords(userId, orgId, startTime, endTime, projectId);\n }\n\n public async approveTimeRecords(orgId: string, sheetId: string, startDate: Date, endDate: Date) {\n this.timeRecordRepository.approveTimeRecords(orgId, sheetId, startDate, endDate);\n }\n\n public async disapproveTimeRecords(orgId: string, sheetId: string) {\n this.timeRecordRepository.disapproveTimeRecords(orgId, sheetId);\n }\n}\n","/* eslint-disable class-methods-use-this */\nimport * as ILogger from 'bunyan';\nimport { inject, injectable, tagged } from 'inversify';\nimport { ITimesheetState, ITimesheetCreateRequest, ITimeRecord } from '@admin-layout/timetracker-core';\nimport {\n ConfigurationTarget,\n generateOrgUri,\n IConfigFragmentName,\n ServerTypes,\n IPreferencesService,\n} from '@adminide-stack/core';\nimport { IMailServiceAction, IMailerServicesendArgs, IMoleculerServiceName } from '@container-stack/mailing-api';\nimport * as moment from 'moment';\nimport { ServiceBroker, CallingOptions } from 'moleculer';\nimport { CommonType, TaggedType } from '@common-stack/core';\nimport { TYPES, EmailTemplateCodes } from '../constants';\nimport { config } from '../config';\nimport { ITimesheetService } from '../interfaces/timesheet-service';\nimport { ITimesheetRepository, ITimeRecordRepository } from '../interfaces';\n\n@injectable()\nexport class TimesheetService implements ITimesheetService {\n private logger: ILogger;\n\n constructor(\n @inject(TYPES.ITimesheetRepository)\n protected timesheetRepository: ITimesheetRepository,\n\n @inject(TYPES.ITimeRecordRepository)\n protected timeRecordRepository: ITimeRecordRepository,\n\n @inject(TYPES.ITimeRecordService)\n protected timeRecordService: ITimeRecordRepository,\n\n @inject(ServerTypes.IPreferenceEditorService)\n private preferencesService: IPreferencesService,\n\n @inject(CommonType.MOLECULER_BROKER)\n private broker: ServiceBroker,\n\n @inject('Settings')\n @tagged(TaggedType.MICROSERVICE, true)\n private settings: any,\n @inject('Logger')\n logger: ILogger,\n ) {\n this.logger = logger;\n }\n\n public async getTimesheets(orgId: string, userId?: string) {\n return this.timesheetRepository.getTimesheets(orgId, userId);\n }\n\n public async getTimesheetsWithTotalHours(orgId: string, userId?: string) {\n const timesheets = await this.timesheetRepository.getTimesheets(orgId, userId);\n const timeRecords: (ITimeRecord & { _id?: Object })[] = await this.timeRecordRepository.getTimeRecords(orgId, userId);\n return timesheets.map((timesheet) => {\n const sheetTotalDuration = timeRecords\n .filter(\n (tr) =>\n timesheet.timeRecordsId?.includes(tr._id.toString()),\n )\n .reduce(\n (duration, tr) =>\n duration + Math.floor((moment(tr.endTime).valueOf() - moment(tr.startTime).valueOf()) / 1000),\n 0,\n );\n return {\n id: timesheet.id,\n startDate: timesheet.startDate,\n endDate: timesheet.endDate,\n state: timesheet.state,\n userId: timesheet.userId,\n orgId,\n approvedBy: timesheet.approvedBy,\n approvedOn: timesheet.approvedOn,\n submittedOn: timesheet.submittedOn,\n updatedBy: timesheet.updatedBy,\n updatedOn: timesheet.updatedOn,\n totalDuration: sheetTotalDuration,\n };\n });\n }\n\n public async getDurationTimesheets(orgId: string, start: Date, end: Date) {\n const timesheets = await this.timesheetRepository.getOrganizationTimesheets(orgId);\n return timesheets.filter(\n (sh) =>\n moment(start).format('YYYY-MM-DD') === moment(sh.startDate).format('YYYY-MM-DD') &&\n moment(end).format('YYYY-MM-DD') === moment(sh.endDate).format('YYYY-MM-DD'),\n );\n }\n\n public async createTimesheet(userId: string, orgId: string, request: ITimesheetCreateRequest) {\n return this.timesheetRepository.createTimesheet(userId, orgId, request);\n }\n\n public async updateTimesheet(\n userId: string,\n orgId: string,\n sheetId: string,\n request: ITimesheetCreateRequest,\n userContext?: any,\n ) {\n try {\n await this.timesheetRepository.updateTimesheet(orgId, sheetId, request);\n if (request.state === ITimesheetState.APPROVED) {\n // approve time records from startDate to endDate\n this.timeRecordService.approveTimeRecords(orgId, sheetId, request.startDate, request.endDate);\n } else if (request.state === ITimesheetState.DENYED) {\n // approve time records from startDate to endDate\n this.timeRecordService.disapproveTimeRecords(orgId, sheetId);\n }\n const resourceUri = generateOrgUri(orgId, IConfigFragmentName.settings);\n const { settings } = (await this.preferencesService.viewerSettings({\n target: ConfigurationTarget.ORGANIZATION_RESOURCE,\n settingsResource: resourceUri,\n })) as any;\n if (\n request.state === ITimesheetState.APPROVED &&\n settings.timetracker.notifications.approvalNotifications &&\n settings.timetracker.notifications.enableTimetrackerNotifications\n ) {\n const mailTopic = 'Timsheet approved';\n const mailTo = userContext.emailId;\n const mailFrom = config.MAIL_SEND_DEFAULT_EMAIL;\n const templateId = EmailTemplateCodes.TIMESHEET_APPROVAL;\n const templateVars = {\n name: userContext.username,\n startDate: moment(request.startDate).format('YYYY-MM-DD'),\n endDate: moment(request.endDate).format('YYYY-MM-DD'),\n timesheet_url: `${config.CLIENT_URL}/${orgId}/time-tracker/timeapproval`,\n contact_url: `${config.CLIENT_URL}`,\n };\n this.sendMail(mailTopic, mailTo, mailFrom, templateId, templateVars);\n }\n if (\n request.state === ITimesheetState.SUBMITTED &&\n settings.timetracker.notifications.submitNotifications &&\n settings.timetracker.notifications.enableTimetrackerNotifications\n ) {\n const mailTopic = 'Timsheet submitted';\n const mailTo = userContext.emailId;\n const mailFrom = config.MAIL_SEND_DEFAULT_EMAIL;\n const templateId = EmailTemplateCodes.SUBMIT_TIME;\n const templateVars = {\n name: userContext.username,\n startDate: moment(request.startDate).format('YYYY-MM-DD'),\n endDate: moment(request.endDate).format('YYYY-MM-DD'),\n timesheet_url: `${config.CLIENT_URL}/${orgId}/time-tracker/timeapproval`,\n contact_url: `${config.CLIENT_URL}`,\n };\n this.sendMail(mailTopic, mailTo, mailFrom, templateId, templateVars);\n\n return true;\n }\n } catch (e) {\n throw new Error(e.message);\n }\n }\n\n public async updateTimesheetStatus(orgId: string, sheetId: string, state: ITimesheetState) {\n try {\n const timesheet = await this.timesheetRepository.updateTimesheetStatus(orgId, sheetId, state);\n console.log('updateTimesheetStatus.timesheet =>', timesheet);\n if (state === ITimesheetState.APPROVED) {\n // approve time records from startDate to endDate\n console.log('APPROVED');\n }\n\n return true;\n } catch (e) {\n throw new Error(e.message);\n }\n }\n\n public async removeTimesheet(userId: string, orgId: string, sheetId: string) {\n return this.timesheetRepository.removeTimesheet(userId, orgId, sheetId);\n }\n\n private sendMail(topic, to, from, templateId, templateVars) {\n return this.callAction<void, IMailerServicesendArgs>(\n IMailServiceAction.send,\n {\n request: {\n topic,\n to,\n templateId,\n from,\n variables: templateVars,\n },\n },\n IMoleculerServiceName.MailService,\n );\n }\n\n private async callAction<T, P = any>(command: string, params?: P, topic?: string, opts?: CallingOptions) {\n return this.broker.call<T, P>(`${topic}.${command}@${this.settings.adminApiNamespace}`, params, opts);\n }\n}\n","import { Schema, Model, Document, Connection } from 'mongoose';\nimport { ITimeRecords, ITimeRecord, } from '@admin-layout/timetracker-core';\n\nexport declare type Maybe<T> = T | null;\n\nexport interface ITimeRecordModel extends ITimeRecord, Document {\n id?: any;\n}\n\nexport interface ITimeRecordsModel extends ITimeRecords, Document {\n id: any;\n timeRecords: ITimeRecordModel[];\n}\n\nconst PauseStatusSchema = new Schema({\n pausedTime: { type: Date },\n restartTime: { type: Date },\n});\n\n// ===> TimeRecord\nconst TimeRecordSchema = new Schema({\n userId: { type: String, index: true },\n startTime: { type: Date },\n endTime: { type: Date, default: null },\n taskName: { type: String },\n description: { type: String },\n taskId: { type: String }, // ----> task\n tags: { type: [String] },\n isBillable: { type: Boolean },\n projectId: { type: String }, // ----> project\n timesheetId: { type: String }, // ----> timesheet\n isPause: { type: Boolean, default: false },\n isTimeout: { type: Boolean, default: false },\n pauseStatus: { type: [PauseStatusSchema] }\n});\n\nTimeRecordSchema.index({ endTime: 1, startTime: 1, userId: 1 } as any);\n\nconst TimeRecordsSchema = new Schema({\n orgId: { type: String, index: true },\n timeRecords: [TimeRecordSchema],\n});\n\nTimeRecordSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimeRecordSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimeRecordsSchema.set('toObject', { virtuals: true });\n\nexport type TimeRecordsModelType = Model<ITimeRecordsModel>;\n\nexport const TimeRecordsModelFunc: (db: Connection) => TimeRecordsModelType = (db) =>\n db.model<ITimeRecordsModel>('timerecords', TimeRecordsSchema);\n","import { Schema, Model, Document, Connection } from 'mongoose';\nimport { ITimesheets, ITimesheet } from '@admin-layout/timetracker-core';\n\nexport declare type Maybe<T> = T | null;\n\nexport interface ITimeSheetModel extends ITimesheet, Document {\n id?: any;\n}\nexport interface ITimesheetsModel extends ITimesheets, Document {\n id: any;\n timesheets: ITimeSheetModel[];\n}\n\nenum TimesheetState {\n OPEN,\n APPROVED_PENDING,\n APPROVED,\n APPROVED_FINALIZED,\n DENYED,\n SUBMITTED,\n DENYED_FINALIZED,\n}\n\n// ===> Timesheet\nconst TimesheetSchema = new Schema({\n userId: { type: String, index: true },\n startDate: { type: Date },\n endDate: { type: Date },\n state: { type: TimesheetState },\n submittedOn: { type: Date },\n approvedOn: { type: Date },\n approvedBy: { type: String },\n updatedBy: { type: String },\n updatedOn: { type: Date },\n timeRecordsId: { type: [String] },\n});\n\nconst TimesheetsSchema = new Schema({\n orgId: { type: String, index: true },\n timesheets: [TimesheetSchema],\n});\n\nTimesheetsSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimesheetsSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimesheetsSchema.set('toObject', { virtuals: true });\n\nexport type TimesheetsModelType = Model<ITimesheetsModel>;\n\nexport const TimesheetsModelFunc: (db: Connection) => TimesheetsModelType = (db) =>\n db.model<ITimesheetsModel>('timesheets', TimesheetsSchema);\n","/* eslint-disable no-underscore-dangle */\nimport { Schema, Model, Document, Connection } from 'mongoose';\nimport { ITimeTracker, ITimeRecord, ITimesheet } from '@admin-layout/timetracker-core';\n\nexport declare type Maybe<T> = T | null;\n\nexport interface ITimeRecordModel extends ITimeRecord, Document {\n id?: any;\n}\nexport interface ITimeSheetModel extends ITimesheet, Document {\n id?: any;\n}\nexport interface ITimeTrackerModel extends ITimeTracker, Document {\n id: any;\n timeRecords: ITimeRecordModel[];\n timesheets: ITimeSheetModel[];\n}\n\nenum TimesheetState {\n OPEN,\n APPROVED_PENDING,\n APPROVED,\n APPROVED_FINALIZED,\n DENYED,\n SUBMITTED,\n DENYED_FINALIZED,\n}\n\nconst TimeActivitySchema = new Schema({\n count: { type: Number },\n isPaused: { type: Boolean },\n isTimeout: { type: Boolean },\n startTime: { type: Number },\n endTime: { type: Number },\n});\n\nconst PauseStatusSchema = new Schema({\n pausedTime: { type: Date },\n restartTime: { type: Date },\n});\n\n// ===> TimeRecord\nconst TimeRecordSchema = new Schema({\n userId: { type: String, index: true },\n startTime: { type: Date },\n endTime: { type: Date, default: null },\n taskName: { type: String },\n description: { type: String },\n taskId: { type: String }, // ----> task\n tags: { type: [String] },\n isBillable: { type: Boolean },\n projectId: { type: String }, // ----> project\n timesheetId: { type: String }, // ----> timesheet\n activities: [TimeActivitySchema],\n isPause: { type: Boolean, default: false },\n isTimeout: { type: Boolean, default: false },\n pauseStatus: { type: [PauseStatusSchema] }\n});\n\nTimeRecordSchema.index({ endTime: 1, startTime: 1, userId: 1 } as any);\n\n// ===> Timesheet\nconst TimesheetSchema = new Schema({\n userId: { type: String, index: true },\n startDate: { type: Date },\n endDate: { type: Date },\n state: { type: TimesheetState },\n submittedOn: { type: Date },\n approvedOn: { type: Date },\n approvedBy: { type: String },\n updatedBy: { type: String },\n updatedOn: { type: Date },\n timeRecordsId: { type: [String] },\n});\n\nconst TimeTrackerSchema = new Schema({\n orgId: { type: String, index: true },\n timeRecords: [TimeRecordSchema],\n timesheets: [TimesheetSchema],\n});\n\nTimeRecordSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimeRecordSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimeTrackerSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimeTrackerSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimeTrackerSchema.set('toObject', { virtuals: true });\n\nexport type TimeTrackerModelType = Model<ITimeTrackerModel>;\n\nexport const TimeTrackerModelFunc: (db: Connection) => TimeTrackerModelType = (db) =>\n db.model<ITimeTrackerModel>('timetracker', TimeTrackerSchema);\n","export * from './timerecord-repository';\nexport * from './timesheet-repository';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-param-reassign */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable no-underscore-dangle */\nimport * as Logger from 'bunyan';\nimport { injectable, inject } from 'inversify';\nimport * as mongoose from 'mongoose';\nimport { ITimeRecordRequest, ITimeRecord, ITimeRecords } from '@admin-layout/timetracker-core';\nimport { ITimeRecordRepository } from '../../interfaces';\nimport { TimeRecordsModelFunc, TimeRecordsModelType, ITimeRecordModel, ITimeRecordsModel } from '../models/timerecords-model';\nimport * as _ from 'lodash';\n\n@injectable()\nexport class TimeRecordRepository implements ITimeRecordRepository {\n private timeRecordsModel: TimeRecordsModelType;\n\n private logger: Logger;\n\n constructor(\n @inject('MongoDBConnection')\n db: mongoose.Connection,\n @inject('Logger')\n logger: Logger,\n ) {\n this.logger = logger.child({ className: 'TimeRecordRepository' });\n this.timeRecordsModel = TimeRecordsModelFunc(db);\n }\n\n public async getTimeRecords(\n orgId: string, userId?: string | RegExp, from?: Date, until?: Date\n ): Promise<Array<ITimeRecord>> {\n if (!userId) {\n userId = /.*/;\n }\n let match: any = {\n 'timeRecords.userId': userId,\n };\n if (from) {\n match = { ...match, 'timeRecords.startTime': { $gte: from } };\n }\n if (until) {\n match = { ...match, 'timeRecords.endTime': { $lte: until } };\n }\n\n const result = await this.timeRecordsModel.aggregate([\n {\n $match: {\n orgId,\n },\n },\n {\n $unwind: '$timeRecords',\n },\n {\n $match: {\n ...match,\n },\n },\n {\n $group: {\n _id: '$orgId',\n timeRecords: {\n $push: '$timeRecords',\n },\n },\n },\n {\n $project: {\n orgId: 1,\n timeRecords: 1,\n },\n },\n ]);\n if (result.length === 0) {\n return [];\n }\n return result[0].timeRecords;\n }\n\n public async getOrganizationTimeRecords(orgId: string): Promise<ITimeRecordModel[]> {\n const trackDoc = await this.timeRecordsModel.findOne({ orgId });\n if (trackDoc && trackDoc.timeRecords) {\n return trackDoc.timeRecords;\n }\n return [];\n }\n\n public async getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord> {\n const trackDoc = await this.timeRecordsModel.findOne({ orgId });\n if (trackDoc) {\n let res;\n if (trackDoc.timeRecords) res = trackDoc.timeRecords.find((tr) => tr.userId === userId && tr.endTime === null);\n return res;\n }\n return null;\n }\n\n public async createTimeRecord(\n userId: string,\n orgId: string,\n request: ITimeRecordRequest,\n ): Promise<Partial<ITimeRecords>> {\n try {\n const response = await this.timeRecordsModel.findOneAndUpdate(\n { orgId },\n { orgId, $push: { timeRecords: request } },\n {\n upsert: true,\n new: true,\n projection: { userId, orgId, timeRecords: { $elemMatch: { startTime: request.startTime } } },\n },\n );\n return response.toObject() as ITimeRecordsModel;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async updateTimeRecord(\n userId: string,\n orgId: string,\n recordId: string,\n request: ITimeRecordRequest,\n ): Promise<Partial<ITimeRecordsModel>> {\n try {\n if (recordId === null || recordId === undefined) throw new Error('TimeRecord id not specified!');\n let setRequest = {};\n _.forIn(request,(value, key) => {\n setRequest = {\n ...setRequest,\n [`timeRecords.$.${key}`]: value,\n };\n });\n const response = await this.timeRecordsModel.findOneAndUpdate(\n { orgId, timeRecords: { $elemMatch: { _id: recordId } } },\n {\n $set: {\n ...setRequest,\n },\n },\n {\n new: true,\n projection: {\n userId,\n orgId,\n timeRecords: { $elemMatch: { _id: recordId } },\n },\n },\n );\n return response.toObject() as ITimeRecordsModel;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async removeTimeRecord(userId: string, orgId: string, recordId: string) {\n try {\n const result = await this.timeRecordsModel.update(\n {\n orgId,\n },\n {\n $pull: { timeRecords: { _id: recordId } },\n },\n );\n if (result.nModified !== 1) {\n throw new Error('TimeRecord is not modified');\n }\n return { userId, orgId, timeRecords: [{ _id: recordId } as any] as ITimeRecord[] };\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async removeDurationTimeRecords(\n userId: string,\n orgId: string,\n startTime: Date,\n endTime: Date,\n projectId: string,\n ) {\n try {\n const trackerDoc = await this.timeRecordsModel.find({ orgId });\n if (trackerDoc && trackerDoc.length > 0) {\n const timeRecords = trackerDoc[0].timeRecords.filter(\n (tr) => tr.startTime < startTime || tr.startTime > endTime || tr.projectId !== projectId,\n );\n await this.timeRecordsModel.update(\n {\n orgId,\n },\n {\n timeRecords,\n },\n );\n return true;\n }\n return false;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async approveTimeRecords(orgId: string, sheetId: string, startDate: Date, endDate: Date) {\n try {\n await this.timeRecordsModel.updateMany(\n {\n orgId,\n },\n { $set: { 'timeRecords.$[el].timesheetId': sheetId } },\n {\n multi: true,\n arrayFilters: [\n {\n 'el.startTime': { $gte: startDate },\n 'el.endTime': { $lte: endDate },\n 'el.timesheetId': null,\n },\n ],\n },\n );\n } catch (e) {\n this.logger.debug('approveTimeRecords =>', e.message);\n throw new Error(e.message);\n }\n }\n\n public async disapproveTimeRecords(orgId: string, sheetId: string) {\n try {\n await this.timeRecordsModel.updateMany(\n {\n orgId,\n },\n { $set: { 'timeRecords.$[el].timesheetId': null } },\n {\n multi: true,\n arrayFilters: [\n {\n 'el.timesheetId': sheetId,\n },\n ],\n },\n );\n } catch (e) {\n this.logger.debug('disapproveTimeRecords =>', e.message);\n throw new Error(e.message);\n }\n }\n}\n","import * as Logger from 'bunyan';\nimport { injectable, inject } from 'inversify';\nimport * as mongoose from 'mongoose';\nimport { ITimesheetCreateRequest, ITimesheetState } from '@admin-layout/timetracker-core';\nimport * as _ from 'lodash';\nimport { CommonType } from '@common-stack/core';\nimport { ServiceBroker } from 'moleculer';\nimport { TimesheetsModelFunc, TimesheetsModelType, ITimeSheetModel } from '../models/timesheets-model';\nimport { ITimesheetRepository } from '../../interfaces';\n\n@injectable()\nexport class TimesheetRepository implements ITimesheetRepository {\n private timesheetsModel: TimesheetsModelType;\n\n private logger: Logger;\n\n constructor(\n @inject('MongoDBConnection')\n db: mongoose.Connection,\n @inject('Logger')\n logger: Logger,\n @inject(CommonType.MOLECULER_BROKER)\n private broker: ServiceBroker,\n ) {\n this.logger = logger.child({ className: 'TimesheetRepository' });\n this.timesheetsModel = TimesheetsModelFunc(db);\n }\n\n public async getOrganizationTimesheets(orgId: string): Promise<ITimeSheetModel[]> {\n const trackDoc = await this.timesheetsModel.findOne({ orgId });\n if (trackDoc && trackDoc.timesheets) {\n return trackDoc.timesheets;\n }\n return [];\n }\n\n public async getTimesheets(orgId: string, userId?: string): Promise<ITimeSheetModel[]> {\n const timesheets = await this.getOrganizationTimesheets(orgId);\n return timesheets.filter((sheet) => !userId || sheet.userId === userId);\n }\n\n public async createTimesheet(userId: string, orgId: string, request: ITimesheetCreateRequest): Promise<boolean> {\n try {\n const response = await this.timesheetsModel.update(\n { orgId },\n { $push: { timesheets: request } },\n { upsert: true },\n );\n return true;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async updateTimesheet(orgId: string, sheetId: string, request: ITimesheetCreateRequest) {\n try {\n let setRequest = {};\n _.forIn(request,(value, key) => {\n setRequest = {\n ...setRequest,\n [`timesheets.$.${key}`]: value,\n };\n });\n const response = await this.timesheetsModel.update(\n { orgId, timesheets: { $elemMatch: { _id: sheetId } } },\n { $set: { ...setRequest } },\n );\n return response;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async updateTimesheetStatus(orgId: string, sheetId: string, state: ITimesheetState) {\n try {\n const response = await this.timesheetsModel.update(\n {\n orgId,\n $elemMatch: { 'timesheets.id': sheetId },\n },\n {\n $set: {\n 'timesheets.$.status': state,\n },\n },\n );\n return response;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async removeTimesheet(userId: string, orgId: string, sheetId: string): Promise<boolean> {\n try {\n await this.timesheetsModel.update(\n {\n orgId,\n },\n {\n $pull: { timesheets: { _id: sheetId } },\n },\n );\n return true;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n}\n","module.exports = require(\"@adminide-stack/core\");","module.exports = require(\"@common-stack/core\");","module.exports = require(\"@common-stack/server-core\");","module.exports = require(\"@vscode-alt/monaco-editor/esm/vs/nls\");","module.exports = require(\"@workbench-stack/core\");","module.exports = require(\"envalid\");","module.exports = require(\"graphql-subscriptions\");","module.exports = require(\"inversify\");","module.exports = require(\"lodash\");","module.exports = require(\"moment\");","module.exports = require(\"mongoose\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/config/config.ts","webpack:///./src/config/index.ts","webpack:///./src/constants/constants.ts","webpack:///./src/constants/index.ts","webpack:///./src/containers/containers.ts","webpack:///./src/containers/index.ts","webpack:///./src/index.ts","webpack:///./src/initialization/index.ts","webpack:///./src/initialization/service-initialization.ts","webpack:///./src/migration/approval_notification.ejs","webpack:///./src/migration/index.ts","webpack:///./src/migration/mail-template.ts","webpack:///./src/migration/submit_notification.ejs","webpack:///./src/module.ts","webpack:///./src/preferences/index.ts","webpack:///./src/preferences/permissions/index.ts","webpack:///./src/preferences/permissions/timing-permissions-contribution.ts","webpack:///./src/preferences/permissions/timing-roles-permission-overwrite.ts","webpack:///./src/preferences/settings/general-settings.ts","webpack:///./src/preferences/settings/index.ts","webpack:///./src/preferences/settings/payment-settings.ts","webpack:///./src/resolvers/index.ts","webpack:///./src/resolvers/timerecord-resolver.ts","webpack:///./src/resolvers/timesheet-resolver.ts","webpack:///./src/schema/common-schema.graphql","webpack:///./src/schema/index.ts","webpack:///./src/schema/timerecord-schema.graphql","webpack:///./src/schema/timesheet-schema.graphql","webpack:///./src/schema/timetracker-schema.graphql","webpack:///./src/services/index.ts","webpack:///./src/services/timerecord-service.ts","webpack:///./src/services/timesheet-service.ts","webpack:///./src/store/models/timerecords-model.ts","webpack:///./src/store/models/timesheets-model.ts","webpack:///./src/store/models/timetracker-model.ts","webpack:///./src/store/repository/index.ts","webpack:///./src/store/repository/timerecord-repository.ts","webpack:///./src/store/repository/timesheet-repository.ts","webpack:///external \"@adminide-stack/core\"","webpack:///external \"@common-stack/core\"","webpack:///external \"@common-stack/server-core\"","webpack:///external \"@vscode-alt/monaco-editor/esm/vs/nls\"","webpack:///external \"@workbench-stack/core\"","webpack:///external \"envalid\"","webpack:///external \"graphql-subscriptions\"","webpack:///external \"inversify\"","webpack:///external \"lodash\"","webpack:///external \"moment\"","webpack:///external \"mongoose\""],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;AClFA,sDAAsD;AACtD,8DAAmC;AAEnC,MAAM,EAAE,GAAG,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B;;;;;;;;;;;;ACXhC,iD;;;;;;;;;;;ACAA,+C;;;;;;;;;;;ACAA,sD;;;;;;;;;;;ACAA,iE;;;;;;;;;;;ACAA,kD;;;;;;;;;;;ACAA,oC;;;;;;;;;;;ACAA,kD;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,qC","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","/* eslint-disable import/no-extraneous-dependencies */\nimport * as envalid from 'envalid';\n\nconst { str, num } = envalid;\n\nexport const config = envalid.cleanEnv(process.env, {\n MAIL_SEND_DEFAULT_EMAIL: str(),\n CLIENT_URL: str(),\n});\n","export * from './config';\n","export const DEFAULT_USER = '123';\nexport const DEFAULT_ORG = '123';\nexport const TYPES = {\n ITimeTrackerService: Symbol('ITimeTrackerService'),\n ITimeRecordService: Symbol('ITimeRecordService'),\n ITimesheetService: Symbol('ITimesheetService'),\n ITimeTrackerRepository: Symbol('ITimeTrackerRepository'),\n ITimeRecordRepository: Symbol('ITimeRecordRepository'),\n ITimesheetRepository: Symbol('ITimesheetRepository'),\n ITaskRepository: Symbol('ITaskRepository'),\n ITaskService: Symbol('ITaskService'),\n};\n\nexport const EmailTemplateCodes = {\n TIMESHEET_APPROVAL: 'TIMESHEET_APPROVAL_EMAIL_TEMPLATE',\n ENABLE_TIMETRACKER: 'ENABLE_TIMETRACKER_EMAIL_TEMPLATE',\n SUBMIT_TIME: 'SUBMIT_TIME_EMAIL_TEMPLATE',\n TIMETRACKING_STOP: 'TIMETRACKING_STOP_TEMPLATE',\n};\n\nexport enum IPreDefineAccountPermissions {\n // others\n viewOthersTimeTracker = 'organization.timetracker.others.view',\n createOthersTimeTracker = 'organization.timetracker.others.create',\n editOthersTimeTracker = 'organization.timetracker.others.edit',\n deleteOthersTimeTracker = 'organization.timetracker.others.delete',\n manageOthersTimeTracker = 'organization.timetracker.others.manage',\n\n // self\n viewSelfTimeTracker = 'organization.timetracker.self.view',\n createSelfTimeTracker = 'organization.timetracker.self.create',\n editSelfTimeTracker = 'organization.timetracker.self.edit',\n deleteSelfTimeTracker = 'organization.timetracker.self.delete',\n manageSelfTimeTracker = 'organization.timetracker.self.manage',\n}\n","export * from './constants';\n","import { ContainerModule, interfaces } from 'inversify';\nimport { TYPES } from '../constants';\nimport { TimeRecordService, TimesheetService } from '../services';\nimport { TimeRecordRepository, TimesheetRepository } from '../store/repository';\nimport { TimesheetApprovalMailTemplate, TimesheetSubmitMailTemplate } from '../migration';\n\nexport const timeTrackerModule: (settings: any) => ContainerModule = (setting) =>\n new ContainerModule((bind: interfaces.Bind) => {\n bind(TYPES.ITimeRecordRepository).to(TimeRecordRepository).inSingletonScope().whenTargetIsDefault();\n bind(TYPES.ITimesheetRepository).to(TimesheetRepository).inSingletonScope().whenTargetIsDefault();\n bind(TYPES.ITimeRecordService).to(TimeRecordService).inSingletonScope().whenTargetIsDefault();\n bind(TYPES.ITimesheetService).to(TimesheetService).inSingletonScope().whenTargetIsDefault();\n\n bind('MongodbMigration').to(TimesheetApprovalMailTemplate).whenTargetNamed(TimesheetApprovalMailTemplate.name);\n bind('MongodbMigration').to(TimesheetSubmitMailTemplate).whenTargetNamed(TimesheetSubmitMailTemplate.name);\n });\n","export * from './containers';\n","import { Feature } from '@common-stack/server-core';\nimport TimeTracker from './module';\n\nexport * from './constants';\nexport * from './store/repository';\nexport * from './store/models/timetracker-model';\n\nexport default new Feature(TimeTracker);\n","export * from './service-initialization';\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { IRegistryExtensions as RegistryExtensions, IConfigurationRegistry, IRegistry } from '@adminide-stack/core';\nimport * as ILogger from 'bunyan';\nimport { TYPES as serverTypes, Schemas } from '@workbench-stack/core';\nimport { CommonType } from '@common-stack/core';\nimport { interfaces } from 'inversify';\nimport { TimeTrackerContribution } from '../preferences';\n\nexport const mainLoadConfigurationPre = async (_, container: interfaces.Container) => {\n const logger = container.get<ILogger>(CommonType.LOGGER);\n logger.info('PRESTART START: -- load TimeTrackerContribution to registry');\n\n const registry = container.get<IRegistry>(serverTypes.IRegistry);\n const configurationRegistry = registry.as<IConfigurationRegistry>(RegistryExtensions.Configuration);\n configurationRegistry.registerConfiguration(TimeTrackerContribution);\n logger.info('PRESTART ENDS: -- load TimeTrackerContribution to registry');\n};\n","export default \"<html>\\n <head>\\n\\n </head>\\n\\n <body>\\n <h1> Timesheet has approved! </h1>\\n <p> Dear <%= name %>! </p>\\n <p> Your timesheet from <bold> <%= startDate %> </bold> to <bold> <%= endDate %> </bold> has been approved! </p>\\n You can see timesheet details <a href=\\\"<%= timesheet_url %>\\\" __target=\\\"blank\\\"> here </a>\\n\\n <br /> <br />\\n <p> If you have any problem, please <a href=\\\"<%= contact_url %>\\\"> Contact us </a></p>\\n </body>\\n</html>\";","export * from './mail-template'","/* eslint-disable max-classes-per-file */\nimport * as Logger from 'bunyan';\nimport { injectable, inject, tagged } from 'inversify';\nimport { IDatabaseMigration } from '@adminide-stack/core';\nimport { IMoleculerServiceName, IMailServiceAction, IMailerServicesendArgs } from '@container-stack/mailing-api';\nimport { CommonType, TaggedType } from '@common-stack/core';\nimport { CallingOptions, ServiceBroker } from 'moleculer';\nimport { EmailTemplateCodes } from '../constants';\nimport { config } from '../config';\n\nconst TimeApprovalTemplate = require('./approval_notification.ejs');\nconst TimeSubmitTemplate = require('./submit_notification.ejs');\n\n@injectable()\nexport class TimesheetApprovalMailTemplate implements IDatabaseMigration {\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n protected broker: ServiceBroker,\n @inject('Settings')\n @tagged(TaggedType.MICROSERVICE, true)\n private settings: any,\n ) { }\n\n get id() {\n return 'EmailTemplateCodes_05012021';\n }\n\n public async up(): Promise<void> {\n const requestData = {\n engine: 'ejs',\n code: EmailTemplateCodes.TIMESHEET_APPROVAL,\n description: 'Timesheet approved',\n html: TimeApprovalTemplate.default,\n text: 'Timesheet approved',\n name: 'Timesheet approval notification',\n topic: 'Timesheet approved.',\n };\n\n if (config.isDev) {\n await this.broker.waitForServices('MailService');\n }\n\n return this.callAction(\n IMailServiceAction.saveTemplate,\n { request: requestData },\n IMoleculerServiceName.MailService,\n );\n }\n\n private async callAction<T, P = any>(command: string, params?: P, topic?: string, opts?: CallingOptions) {\n return this.broker.call<T, P>(`${topic}.${command}@${this.settings.adminApiNamespace}`, params, opts);\n }\n}\n\n@injectable()\nexport class TimesheetSubmitMailTemplate implements IDatabaseMigration {\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n protected broker: ServiceBroker,\n @inject('Settings')\n @tagged(TaggedType.MICROSERVICE, true)\n private settings: any,\n ) { }\n\n get id() {\n return 'TimesheetSubmitMailTemplate_05012021';\n }\n\n public async up(): Promise<void> {\n const requestData = {\n engine: 'ejs',\n code: EmailTemplateCodes.SUBMIT_TIME,\n description: 'Timesheet submitted',\n html: TimeSubmitTemplate.default,\n text: 'Timesheet submitted',\n name: 'Timesheet submit notification',\n topic: 'Timesheet submitted.',\n };\n if (config.isDev) {\n await this.broker.waitForServices('MailService');\n }\n\n return this.callAction(\n IMailServiceAction.saveTemplate,\n { request: requestData },\n IMoleculerServiceName.MailService,\n );\n }\n\n private async callAction<T, P = any>(command: string, params?: P, topic?: string, opts?: CallingOptions) {\n return this.broker.call<T, P>(`${topic}.${command}@${this.settings.adminApiNamespace}`, params, opts);\n }\n}\n","export default \"<html>\\n <head>\\n\\n </head>\\n\\n <body>\\n <h1> Timesheet has submitted! </h1>\\n <p> Dear <%= name %>! </p>\\n <p> Your timesheet from <bold> <%= startDate %> </bold> to <bold> <%= endDate %> </bold> has been submitted! </p>\\n You can see timesheet details <a href=\\\"<%= timesheet_url %>\\\" __target=\\\"blank\\\"> here </a>\\n\\n <br /> <br />\\n <p> If you have any problem, please <a href=\\\"<%= contact_url %>\\\"> Contact us </a></p>\\n </body>\\n</html>\";","import { Feature } from '@common-stack/server-core';\nimport { interfaces } from 'inversify';\nimport { schema } from './schema';\nimport { timeTrackerModule } from './containers';\nimport { resolvers } from './resolvers';\nimport { TYPES } from './constants';\nimport { mainLoadConfigurationPre } from './initialization';\nimport { TimeTrackerRolesContribution, TimeTrackerRolesPermissionOverwrite } from './preferences';\n\nconst createServiceFunc = (container: interfaces.Container) => ({\n timeRecordService: container.get(TYPES.ITimeRecordService),\n timesheetService: container.get(TYPES.ITimesheetService),\n});\n\nexport default new Feature({\n schema,\n createResolversFunc: resolvers,\n createContainerFunc: [timeTrackerModule],\n createServiceFunc,\n preStartFunc: [mainLoadConfigurationPre],\n addPermissions: {\n createPermissions: [TimeTrackerRolesContribution],\n },\n rolesUpdate: {\n overwriteRolesPermissions: TimeTrackerRolesPermissionOverwrite,\n },\n});\n","export * from './settings';\nexport * from './permissions';\n","export * from './timing-permissions-contribution';\nexport * from './timing-roles-permission-overwrite';\n","import { ConfigurationScope, IPermissionType } from '@adminide-stack/core';\nimport * as nls from '@vscode-alt/monaco-editor/esm/vs/nls';\nimport { IRoles } from '@common-stack/server-core';\nimport { IPreDefineAccountPermissions } from '../../constants';\n\nconst extraParams = {\n type: 'string',\n enum: [IPermissionType.Allow, IPermissionType.Deny, IPermissionType.NotSet],\n default: IPermissionType.NotSet,\n scope: ConfigurationScope.WINDOW,\n};\nexport const TimeTrackerRolesContribution: IRoles<ConfigurationScope> = {\n // others\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.viewOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to view Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.viewOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to view Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.viewOthersTimeTracker,\n 'View an Time Tracker, Time Reports and Timesheet of others.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.createOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.createOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to create Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.createOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to create Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.createOthersTimeTracker,\n 'Create Time Tracker, Reports and Timesheet of other members.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.editOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.editOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to edit Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.editOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to edit Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.editOthersTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of other members',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.manageOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to manage Time Tracker, Reports and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.manageOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to manage Time Tracker, Reports and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.manageOthersTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of other members',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.deleteOthersTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to delete Time Tracker and Timesheet of other members.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.deleteOthersTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to delete Time Tracker and Timesheet of other members.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.deleteOthersTimeTracker,\n 'Delete Time Tracker and Timesheet of other members.',\n ),\n ...extraParams,\n },\n // self\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.viewSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to view Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.viewSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to view Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.viewSelfTimeTracker,\n 'View an Time Tracker, Time Reports and Timesheet of self',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.createSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.createSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to create Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.createSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to create Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.createSelfTimeTracker,\n 'Create Time Tracker, Reports and Timesheet of self.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.editSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.editSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to edit Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.editSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to edit Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.editSelfTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of self.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.manageSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to manage Time Tracker, Reports and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.manageSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to manage Time Tracker, Reports and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.manageSelfTimeTracker,\n 'Manage Time Tracker, Reports and Timesheet of self.',\n ),\n ...extraParams,\n },\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: {\n enumDescriptions: [\n nls.localize(\n `${IPreDefineAccountPermissions.deleteSelfTimeTracker}.${IPermissionType.Allow}`,\n 'Has ability to delete Time Tracker and Timesheet of self.',\n ),\n nls.localize(\n `${IPreDefineAccountPermissions.deleteSelfTimeTracker}.${IPermissionType.Deny}`,\n 'No ability to delete Time Tracker and Timesheet of self.',\n ),\n ],\n description: nls.localize(\n IPreDefineAccountPermissions.deleteSelfTimeTracker,\n 'Delete Time Tracker and Timesheet of self.',\n ),\n ...extraParams,\n },\n};\n","import { IPermissionType, IApplicationRoles } from '@adminide-stack/core';\nimport { IPreDefineAccountPermissions } from '../../constants';\n\nexport const TimeTrackerRolesPermissionOverwrite = {\n [IApplicationRoles.OWNER]: {\n // self\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Allow,\n\n // others\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.ADMIN]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.ORGANIZATION_MANAGER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Allow,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.PROJECT_ADMIN]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Allow,\n },\n [IApplicationRoles.MEMBER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n [IApplicationRoles.PROJECT_VIEWER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n [IApplicationRoles.USER]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Allow,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n [IApplicationRoles.GUEST]: {\n [IPreDefineAccountPermissions.viewSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteSelfTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageSelfTimeTracker]: IPermissionType.Deny,\n\n [IPreDefineAccountPermissions.viewOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.createOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.editOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.deleteOthersTimeTracker]: IPermissionType.Deny,\n [IPreDefineAccountPermissions.manageOthersTimeTracker]: IPermissionType.Deny,\n },\n};\n","import { ConfigurationScope, IConfigurationPropertySchema } from '@adminide-stack/core';\nimport { localize } from '@vscode-alt/monaco-editor/esm/vs/nls';\n// const localize = (id, defaultMessage) => defineMessages({\n// id,\n// defaultMessage,\n\n// });\nconst enum TimeFormat {\n ROUNDED_0_00_12 = 'h.mm A',\n ROUNDED_0_00_24 = 'H.mm',\n PRECISE_00_00_00_12 = 'hh:mm:ss A',\n PRECISE_00_00_00_24 = 'HH:mm:ss',\n ROUNDED_UP_00_00_12 = 'hh:mm A',\n ROUNDED_UP_00_00_24 = 'HH:mm',\n}\n\nconst enum GroupProjectsBy {\n CLIENT = 'Client',\n CATEGORY = 'Category',\n CUSTOM = 'Custom',\n}\nconst enum DateFormat {\n USFORMAT = 'MM-DD-YYYY',\n UKFORMAT = 'DD-MM-YYYY',\n ISOFORMAT = 'YYYY-MM-DD',\n}\n\nexport const enum WeekDay {\n SUN = 'Sunday',\n MON = 'Monday',\n TUE = 'Tuesday',\n WED = 'Wednesday',\n THU = 'Thursday',\n FRI = 'Friday',\n SAT = 'Saturday',\n}\n\nconst enum FristWeekOfTheYear {\n FIRST_DAY = 'Week containing first day of the year',\n FIRST_FULL_7DAY = 'First full seven-day week in January',\n FIRST_4_DAY = 'First four-day week in January',\n}\n\nconst enum TimeRoundingUpToValue {\n IN_MINUTES_15 = 15 * 60,\n IN_MINUTES_1 = 1 * 60,\n IN_MINUTES_5 = 5 * 60,\n IN_MINUTES_6 = 6 * 60,\n IN_MINUTES_10 = 10 * 60,\n IN_MINUTES_12 = 12 * 60,\n IN_MINUTES_30 = 30 * 60,\n IN_HOUR_1 = 1 * 60 * 60,\n IN_HOUR_4 = 4 * 60 * 60,\n}\n\nconst enum TimeRoundedType {\n ROUND_UP_TO = 'Round up to',\n ROUND_TO_NEAREST = 'Round to nearest',\n ROUND_DOWN_TO = 'Roudn down to',\n}\nexport const TimeTrackerProperties: { [path: string]: IConfigurationPropertySchema } = {\n // notifications\n 'timetracker.notifications.enableTimetrackerNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.timeTrackingNotification',\n 'Allow timetracker emails to be send',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n\n 'timetracker.notifications.timeTrackingNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.timeTrackingNotification',\n 'An email will be send when tracking is stopped by the system due to lack of user response',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.notifications.approvalNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.approvalNotifications',\n 'An email will be sent to me when my timesheet is approved',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.notifications.submitNotifications': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.notifications.submitNotifications',\n 'An email will be sent to me when team member submits time (Approval Managers only)',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n\n // Time Tracking\n 'timetracker.activity.autoStop': {\n type: 'number',\n default: 24,\n description: localize(\n 'timetracker.activity.autoStop',\n 'Tracking will stop once maximum tack length has been exceeded',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.activity.waitingTime': {\n type: 'number',\n default: 120,\n description: localize(\n 'timetracker.activity.waitingTime',\n 'Enable activity check on the time tracking to ask if you are still tracking after the choosen idle time (in seconds)',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.activity.maxTimeInADay': {\n type: 'number',\n default: 120,\n description: localize(\n 'timetracker.activity.maxTimeInADay',\n 'Enable activity check on the time tracking upto choosen max time in a day(in seconds). It can change upto 1440',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.timerecord.automaticLock': {\n type: 'string',\n default: null,\n description: localize(\n 'accountNotificationPrimaryEmail',\n 'Prevent regular users from editing their past time or adding new entries to past dates',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.billable': {\n type: 'boolean',\n default: true,\n description: localize(\n 'timetracker.project.billable',\n 'When you create a project, make it billable so its time entries are set as billable by default.',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.project.daysAllowedToWork': {\n type: ['string'],\n default: [WeekDay.MON, WeekDay.TUE, WeekDay.WED, WeekDay.THU, WeekDay.FRI],\n enum: [WeekDay.MON, WeekDay.TUE, WeekDay.WED, WeekDay.THU, WeekDay.FRI, WeekDay.SAT, WeekDay.SUN],\n description: localize('timetracker.project.recurringDailyLimit', 'Select working day'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.firstDayOfTheWeek': {\n type: 'string',\n enum: [WeekDay.MON, WeekDay.TUE, WeekDay.WED, WeekDay.THU, WeekDay.FRI, WeekDay.SAT, WeekDay.SUN],\n default: WeekDay.MON,\n description: localize('timetracker.project.firstDayOfTheWeek', 'First day of the week'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.firstWeekOfTheyear': {\n type: 'string',\n enum: [FristWeekOfTheYear.FIRST_4_DAY, FristWeekOfTheYear.FIRST_FULL_7DAY, FristWeekOfTheYear.FIRST_DAY],\n default: FristWeekOfTheYear.FIRST_4_DAY,\n enumDescriptions: [\n localize(\n 'timetracker.project.firstWeekOfTheyear.FIRST_4_DAY',\n 'The week regarded to be the first week of the year is that which contains at least 4 days of the new year.',\n ),\n localize(\n 'timetracker.project.firstWeekOfTheyear.FIRST_FULL_7DAY',\n 'The week regarded as the first week of the year is that which contains 7 full days in the new year.',\n ),\n localize(\n 'timetracker.project.firstWeekOfTheyear.FIRST_DAY',\n 'The week regarded as the first week of the years is that which contains at least one-day of the new year.',\n ),\n ],\n description: localize(\n 'timetracker.project.firstWeekOfTheyear',\n 'You can set how you start or view the first calendar week of the year. This will be visible on Timetracker pages like \"Reports\" or \"Calender View\".',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.timeFormat': {\n type: 'string',\n enum: [\n TimeFormat.ROUNDED_0_00_12,\n TimeFormat.ROUNDED_0_00_24,\n TimeFormat.PRECISE_00_00_00_12,\n TimeFormat.PRECISE_00_00_00_24,\n TimeFormat.ROUNDED_UP_00_00_12,\n TimeFormat.ROUNDED_UP_00_00_24,\n ],\n default: TimeFormat.PRECISE_00_00_00_12,\n enumDescriptions: [\n localize('timetracker.project.timeFormat.ROUNDED_0_00_12', '\"0.00 AM/PM\" (12 hours rounded)'),\n localize('timetracker.project.timeFormat.ROUNDED_0_00_24', '\"0.00\" (24 hours rounded)'),\n localize(\n 'timetracker.project.timeFormat.PRECISE_00_00_00_12',\n '\"00:00:00 AM/PM\" (precise 12 hours format)',\n ),\n localize('timetracker.project.timeFormat.PRECISE_00_00_00_24', '\"13:00:00\" (precise 24 hours format)'),\n localize('timetracker.project.timeFormat.ROUNDED_UP_00_00_12', '\"00:00 AM/PM\" (rounded up)'),\n localize('timetracker.project.timeFormat.ROUNDED_UP_00_00_24', '\"13:00\" (rounded up)'),\n ],\n description: localize(\n 'timetracker.project.timeFormat',\n 'Select the format in which you want your entry represented',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.dateFormat': {\n type: 'string',\n enum: [DateFormat.USFORMAT, DateFormat.UKFORMAT, DateFormat.ISOFORMAT],\n default: DateFormat.USFORMAT,\n enumDescriptions: [\n localize('timetracker.project.dateFormat.USFORMAT', '\"MM-DD-YYYY\" (US standard)'),\n localize('timetracker.project.dateFormat.UKFORMAT', '\"DD-MM-YYYY\" (UK standard)'),\n localize('timetracker.project.dateFormat.ISOFORMAT', '\"YYYY-MM-DD\" (ISO FORMAT)'),\n ],\n description: localize(\n 'timetracker.project.dateFormat',\n 'Select the format in which you want your entry represented',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.roundedToNearest': {\n type: 'string',\n enum: [\n TimeRoundingUpToValue.IN_MINUTES_1,\n TimeRoundingUpToValue.IN_MINUTES_5,\n TimeRoundingUpToValue.IN_MINUTES_6,\n TimeRoundingUpToValue.IN_MINUTES_10,\n TimeRoundingUpToValue.IN_MINUTES_12,\n TimeRoundingUpToValue.IN_MINUTES_15,\n TimeRoundingUpToValue.IN_MINUTES_30,\n TimeRoundingUpToValue.IN_HOUR_1,\n TimeRoundingUpToValue.IN_HOUR_4,\n ],\n default: TimeRoundingUpToValue.IN_MINUTES_15,\n enumDescriptions: [\n localize('TimeRoundingUpToValue.IN_MINUTES_1', '1 minute'),\n localize('TimeRoundingUpToValue.IN_MINUTES_5', '5 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_6', '6 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_10', '10 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_12', '12 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_15', '15 minutes'),\n localize('TimeRoundingUpToValue.IN_MINUTES_30', '30 minutes'),\n localize('TimeRoundingUpToValue.IN_HOUR_1', '1 hour'),\n localize('TimeRoundingUpToValue.IN_HOUR_4', '4 hours'),\n ],\n description: localize('timetracker.project.roundedToNearest', 'Round to nearest selected minute/hour'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.roundedType': {\n type: 'string',\n enum: [TimeRoundedType.ROUND_UP_TO, TimeRoundedType.ROUND_TO_NEAREST, TimeRoundedType.ROUND_DOWN_TO],\n default: TimeRoundedType.ROUND_TO_NEAREST,\n enumDescriptions: [\n localize(\n 'timetracker.project.roundedType.ROUND_UP_TO',\n 'e.g. if you set the interval to 30min, a 26min entry will show up in report as 30min',\n ),\n localize(\n 'timetracker.project.roundedType.ROUND_TO_NEAREST',\n 'e.g. if you set theinterval to 30min, a 14min entry will up as 0min and 26min entry as 30min',\n ),\n localize(\n 'timetracker.project.roundedType.ROUND_DOWN_TO',\n 'e.g. if you set the interval to 30min, a 26min entry will show up in reports as 0min',\n ),\n ],\n description: localize('timetracker.project.roundedType', 'Select the time rounding type'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.report.timeRoundingInReports': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.report.timeRoundingInReports',\n 'Round time in reports up, down, or to nearest X minutes',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n // 'timetracker.project.favorites': {\n // type: 'boolean',\n // default: true,\n // description: localize(\n // 'timetracker.project.favorites',\n // 'Let people mark their most used projects as favorite so they appear at the top of their project list when tracking time.',\n // ),\n // scope: ConfigurationScope.RESOURCE,\n // },\n 'timetracker.project.groupingLabel': {\n type: 'string',\n default: GroupProjectsBy.CLIENT,\n enum: [GroupProjectsBy.CLIENT, GroupProjectsBy.CATEGORY, GroupProjectsBy.CUSTOM],\n description: localize(\n 'timetracker.project.groupingLabel',\n 'Group Project by clients or departments, you can change the lable to somethign else',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.pickerSpecialFilter': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.project.pickerSpecialFilter',\n 'Quickly find the right task in project picker by using the task@project syntax.',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.timerecord.screenshotsEnabled': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.timerecord.screenshotsEnabled',\n 'Generate screenshots every 5 minutes while the timer is running (desktop app only)',\n ),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.project.taskBillableEnabled': {\n type: 'boolean',\n default: false,\n description: localize('SubscribeToBillingNotifications', 'Subscribe to all billing changes'),\n scope: ConfigurationScope.WINDOW,\n },\n 'timetracker.project.taskRateEnabled': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.project.taskRateEnabled',\n 'Have a different rate depending on the task on a project, plus choose whether tasks are billable by default.',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.timeApprovalEnabled': {\n type: 'boolean',\n default: false,\n description: localize(\n 'timetracker.project.timeApprovalEnabled',\n 'Your team can submit their weekly timehseets for review, which you can approve or reject',\n ),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.timeTrackingMode': {\n type: 'string',\n default: 'DEFAULT',\n description: localize('SubscribeToBillingNotifications', 'Subscribe to all billing changes'),\n scope: ConfigurationScope.RESOURCE,\n },\n 'timetracker.project.trackTimeDownToSecond': {\n type: 'boolean',\n description: localize('SubscribeToBillingNotifications', 'Subscribe to all billing changes'),\n default: true,\n scope: ConfigurationScope.WINDOW,\n },\n};\n","import { IConfigurationNode } from '@adminide-stack/core';\nimport { IConfigurationContributionNames } from '@admin-layout/timetracker-core';\nimport { TimeTrackerProperties } from './general-settings';\nimport { TrackerPaymentProperties } from './payment-settings';\n\nexport const TimeTrackerContribution: IConfigurationNode = {\n id: IConfigurationContributionNames.timeTracker,\n type: 'object',\n properties: { ...TimeTrackerProperties, ...TrackerPaymentProperties },\n};\n","import { ConfigurationScope, IConfigurationPropertySchema } from '@adminide-stack/core';\nimport { localize } from '@vscode-alt/monaco-editor/esm/vs/nls';\n\nconst enum PayPeriod {\n NONE = 'None',\n WEEKLY = 'Weekly',\n TWICE_PER_MONTH = 'Twice per month',\n BI_WEEKLY = 'Bi-weekly',\n MONTHLY = 'Monthly',\n}\n\nconst enum PayRate {\n HOURLY = 'Hourly',\n FIXED = 'Fixed',\n}\n\nconst enum ProcessPayment {\n MANUALLY = 'Manually',\n AUTOMATICALLY = 'Automatically',\n}\n\nexport const TrackerPaymentProperties: { [path: string]: IConfigurationPropertySchema } = {\n 'timetracker.user.payment.processPayments': {\n type: 'string',\n default: ProcessPayment.MANUALLY,\n enum: [ProcessPayment.MANUALLY, ProcessPayment.AUTOMATICALLY],\n enumDescriptions: [\n localize(\n 'timetracker.payment.processPayments.manually',\n 'When set manually, time need to be updated manually.',\n ),\n localize(\n 'timetracker.payment.processPayments.automatically',\n \"When set automatically, time is marked as 'paid' in our system and if you have payroll enabled, the payment will be send.\",\n ),\n ],\n description: localize(\n 'timetracker.payment.processPayments',\n 'Choose whether you want to manually send payments or have them automatically processed.',\n ),\n scope: ConfigurationScope.WINDOW,\n overridable: true,\n },\n 'timetracker.user.payment.sendPaymentAfter': {\n type: 'number',\n default: 0,\n description: localize(\n 'timetracker.payment.sendPaymentAfter',\n 'Number of days after pay period ends, you would like to send payments for timesheets. ',\n ),\n scope: ConfigurationScope.WINDOW,\n overridable: true,\n },\n\n 'timetracker.user.payment.payPeriod': {\n type: 'string',\n enum: [PayPeriod.NONE, PayPeriod.WEEKLY, PayPeriod.TWICE_PER_MONTH, PayPeriod.BI_WEEKLY, PayPeriod.MONTHLY],\n default: PayPeriod.NONE,\n description: localize('timetracker.payment.payPeriod', 'Pay Period'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.payType': {\n type: 'string',\n enum: [PayRate.HOURLY, PayRate.FIXED],\n default: PayRate.HOURLY,\n description: localize('timetracker.payment.payType', 'Pay type'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.billRate': {\n type: 'number',\n default: 0.0,\n description: localize('timetracker.payment.billRate', 'Billing Rate'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.payRate': {\n type: 'number',\n default: 0.0,\n description: localize('timetracker.payment.payRate', 'Paying Rate'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.payment.requireTimesheetApproval': {\n type: 'boolean',\n default: false,\n description: localize('timetracker.payment.requireTimesheetApproval', 'Whether it requires Timesheet Approval'),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n // User limits\n 'timetracker.user.recurringWeeklyLimit': {\n type: 'number',\n default: null,\n description: localize(\n 'timetracker.payment.recurringWeeklyLimit',\n 'Limits how much time can be tracked each week',\n ),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n 'timetracker.user.recurringDailyLimit': {\n type: 'number',\n default: null,\n description: localize(\n 'timetracker.payment.recurringDailyLimit',\n 'Limits how much time can be tracked each day',\n ),\n scope: ConfigurationScope.RESOURCE,\n overridable: true,\n },\n};\n","import { resolver as timerecordResolver } from './timerecord-resolver';\nimport { resolver as timesheetResolver } from './timesheet-resolver';\n\nexport const resolvers = [timerecordResolver, timesheetResolver];\n","/* eslint-disable import/no-extraneous-dependencies */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable no-underscore-dangle */\nimport * as _ from 'lodash';\nimport { withFilter } from 'graphql-subscriptions';\nimport { ITimeRecordPubSubEvents } from '@admin-layout/timetracker-core';\n\nexport const resolver = (options) => ({\n TimeRecord: {\n id: (root) => root.id || root._id,\n },\n Query: {\n getTimeRecords: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Query.getTimeRecords) args %j', args);\n return timeRecordService.getTimeRecords(userContext.orgId, args.userId);\n },\n getDurationTimeRecords: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Query.getDurationTimeRecords) args %j', args);\n return timeRecordService.getDurationTimeRecords(userContext.orgId, args.startTime, args.endTime, args.userId);\n },\n getPlayingTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Query.getPlayingTimeRecord) args %j', args);\n return timeRecordService.getPlayingTimeRecord(user._id || user.sub, userContext.orgId);\n },\n },\n Mutation: {\n createTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.createTimeRecord) args %j', args);\n let { userId } = args.request;\n if (userId === undefined) userId = user._id || user.sub;\n return timeRecordService.createTimeRecord(userId, userContext.orgId, args.request);\n },\n updateTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.updateTimeRecord) args %j', args);\n let { userId } = args.request;\n if (userId === undefined) userId = user._id || user.sub;\n return timeRecordService.updateTimeRecord(userId, userContext.orgId, args.recordId, args.request);\n },\n removeTimeRecord: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.removeTimeRecord) args %j', args);\n const userId = user._id || user.sub;\n return timeRecordService.removeTimeRecord(userId, userContext.orgId, args.recordId);\n },\n removeDurationTimeRecords: (root, args, { timeRecordService, user, userContext }) => {\n options.logger.trace('(Mutation.removeDurationTimeRecords) args %j', args);\n const userId = user._id || user.sub;\n return timeRecordService.removeDurationTimeRecords(\n userId,\n userContext.orgId,\n args.startTime,\n args.endTime,\n args.projectId,\n );\n },\n },\n Subscription: {\n SubscribeToTimeTracker: {\n subscribe: withFilter(\n () =>\n options.pubsub.asyncIterator([\n ITimeRecordPubSubEvents.TimeRecordCreated,\n ITimeRecordPubSubEvents.TimeRecordUpdated,\n ITimeRecordPubSubEvents.TimeRecordDeleted,\n ]),\n async (payload, variables, context: {}) =>\n payload.SubscribeToTimeTracker.orgName === variables.orgName &&\n payload.SubscribeToTimeTracker.userId === variables.userId,\n ),\n },\n },\n});\n","/* eslint-disable no-underscore-dangle */\nexport const resolver = (options) => ({\n Query: {\n getTimesheets: (root, args, { timesheetService, userContext }) => {\n options.logger.trace('(Query.getTimeSheets) args %j', args);\n if (!args.withTotalHours) return timesheetService.getTimesheets(userContext.orgId);\n return timesheetService.getTimesheetsWithTotalHours(userContext.orgId);\n },\n getDurationTimesheets: (root, args, { timesheetService, userContext }) => {\n options.logger.trace('(Query.getDurationTimesheets) args %j', args);\n return timesheetService.getDurationTimesheets(userContext.orgId, args.start, args.end);\n },\n },\n\n Mutation: {\n createTimesheet: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.createTimesheet) args %j', args);\n return timesheetService.createTimesheet(user._id || user.sub, userContext.orgId, args.request);\n },\n updateTimesheet: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.updateTimesheet) args %j', args);\n return timesheetService.updateTimesheet(user._id || user.sub, userContext.orgId, args.sheetId, args.request, {\n ...userContext,\n username: user.name,\n });\n },\n removeTimesheet: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.removeTimesheet) args %j', args);\n return timesheetService.removeTimesheet(user._id || user.sub, userContext.orgId, args.sheetId);\n },\n updateTimesheetStatus: (root, args, { timesheetService, user, userContext }) => {\n options.logger.trace('(Mutation.updateTimesheetStatus) args %j', args);\n return timesheetService.updateTimesheetStatus(userContext.orgId, args.sheetId, args.state);\n },\n },\n});\n","export default \"type Tag {\\n id: ID!\\n name: String\\n}\\n\\nenum StartYearWeekType {\\n FIRST_FOURDAY_WEEK\\n FIRST_FULL_WEEK\\n FIRST_DAY_WEEK\\n}\\n\\nextend type Query {\\n getTags: [Tag]\\n getSettings: Settings\\n}\\n\";","import timeRecordSchema from './timerecord-schema.graphql';\nimport timesheetSchema from './timesheet-schema.graphql';\nimport timeTrackerSchema from './timetracker-schema.graphql';\nimport commonSchema from './common-schema.graphql';\n\nconst schema = [timeRecordSchema, timesheetSchema, timeTrackerSchema, commonSchema].join('\\n');\n\nexport { schema };\n","export default \"#type TimeRecords {\\n# orgId: String\\n# userId: String\\n# timeRecords: [TimeRecord]\\n#}\\n\\ntype TimeRecord {\\n id: ID\\n startTime: DateTime\\n endTime: DateTime\\n taskId: String\\n taskName: String\\n description: String\\n tags: [String]\\n isBillable: Boolean\\n projectId: String\\n clientId: String\\n userId: String\\n orgId: String\\n timesheetId: String\\n editable: Boolean\\n isPause: Boolean\\n isTimeout: Boolean\\n pauseStatus: [PauseStatus]\\n}\\n\\ntype PauseStatus {\\n pausedTime: DateTime\\n restartTime: DateTime\\n}\\n\\ninput PauseStatus_Input {\\n pausedTime: DateTime\\n restartTime: DateTime\\n}\\n\\ninput TimeRecordRequest {\\n userId: String\\n startTime: DateTime\\n endTime: DateTime\\n taskName: String\\n description: String\\n tags: [String]\\n isBillable: Boolean\\n projectId: String\\n clientId: String\\n timesheetId: String\\n isPause: Boolean\\n isTimeout: Boolean\\n pauseStatus: [PauseStatus_Input]\\n}\\n\\n\\\"\\\"\\\"\\n Subscription event for timer\\n\\\"\\\"\\\"\\nenum TimeRecordPubSubEvents {\\n TimeRecordCreated\\n TimeRecordUpdated\\n TimeRecordStopped\\n TimeRecordDeleted\\n TimeRecordConfigurationUpdate\\n}\\n\\ntype SubscriptionTimeRecord {\\n mutation: TimeRecordPubSubEvents\\n timeRecord: TimeRecord\\n}\\n\\nextend type Query {\\n getTimeRecords(userId: String): [TimeRecord] @addAccountContext\\n getDurationTimeRecords(startTime: DateTime, endTime: DateTime, userId: String): [TimeRecord] @addAccountContext\\n getPlayingTimeRecord: TimeRecord @addAccountContext\\n}\\n\\nextend type Mutation {\\n createTimeRecord(request: TimeRecordRequest): String @addAccountContext\\n updateTimeRecord(recordId: String!, request: TimeRecordRequest): Boolean @addAccountContext\\n removeTimeRecord(recordId: String!): Boolean @addAccountContext\\n removeDurationTimeRecords(startTime: DateTime, endTime: DateTime, projectId: String): Boolean @addAccountContext\\n}\\n\\nextend type Subscription {\\n SubscribeToTimeTracker(orgName: String, userId: String): SubscriptionTimeRecord\\n}\\n\";","export default \"# scalar DateTime\\nenum TimesheetState {\\n OPEN\\n APPROVED_PENDING\\n APPROVED\\n APPROVED_FINALIZED # --- which means no going back\\n DENYED\\n SUBMITTED\\n DENYED_FINALIZED # --- which means no going back\\n}\\n\\ntype Timesheets {\\n orgId: String\\n userId: String\\n timesheets: [Timesheet]\\n}\\n\\ntype Timesheet {\\n id: ID\\n userId: String\\n startDate: DateTime\\n endDate: DateTime\\n state: TimesheetState\\n submittedOn: DateTime\\n approvedOn: DateTime\\n approvedBy: String\\n updatedBy: String # ---> userId\\n updatedOn: DateTime\\n timeRecordsId: [String]\\n}\\n\\ninput TimesheetCreateRequest {\\n userId: String\\n startDate: DateTime\\n endDate: DateTime\\n state: TimesheetState\\n submittedOn: DateTime\\n approvedOn: DateTime\\n approvedBy: String\\n updatedBy: String # ---> userId\\n updatedOn: DateTime\\n timeRecordsId: [String]\\n}\\n\\ntype TimesheetResponse {\\n id: ID\\n startDate: DateTime\\n endDate: DateTime\\n state: TimesheetState\\n submittedOn: DateTime\\n approvedOn: DateTime\\n approvedBy: String\\n updatedBy: String # ---> userId\\n updatedOn: DateTime\\n userId: String\\n orgId: String\\n totalDuration: Int\\n}\\n\\nextend type Query {\\n getTimesheets(userId: String, withTotalHours: Boolean): [TimesheetResponse] @addAccountContext\\n getDurationTimesheets(start: DateTime, end: DateTime): [TimesheetResponse] @addAccountContext\\n}\\n\\nextend type Mutation {\\n createTimesheet(request: TimesheetCreateRequest): Boolean @addAccountContext\\n updateTimesheet(sheetId: String, request: TimesheetCreateRequest): Boolean @addAccountContext\\n removeTimesheet(sheetId: String): Boolean @addAccountContext\\n updateTimesheetStatus(sheetId: String, state: TimesheetState): Boolean @addAccountContext\\n}\\n\";","export default \"type TimeTracker {\\n userId: String\\n orgId: String\\n timeRecords: [TimeRecord]\\n timesheets: [Timesheet]\\n}\\n\";","export * from './timesheet-service';\nexport * from './timerecord-service';\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable import/no-extraneous-dependencies */\nimport { CdmLogger } from '@cdm-logger/core';\nimport { inject, injectable } from 'inversify';\nimport { ITimeRecord, ITimeRecordRequest, ITimeRecordPubSubEvents } from '@admin-layout/timetracker-core';\nimport { ServerTypes, IPreferencesService } from '@adminide-stack/core';\nimport { PubSubEngine } from 'graphql-subscriptions';\nimport { ServiceBroker } from 'moleculer';\nimport { CommonType } from '@common-stack/core';\nimport { ITimeRecordRepository } from '../interfaces';\nimport { TYPES } from '../constants';\nimport { ITimeRecordService } from '../interfaces/timerecord-service';\n\n@injectable()\nexport class TimeRecordService implements ITimeRecordService {\n private logger: CdmLogger.ILogger;\n\n constructor(\n @inject(TYPES.ITimeRecordRepository)\n protected timeRecordRepository: ITimeRecordRepository,\n\n @inject(ServerTypes.IPreferenceEditorService)\n private preferencesService: IPreferencesService,\n\n @inject(CommonType.MOLECULER_BROKER)\n private broker: ServiceBroker,\n\n @inject('PubSub')\n private pubsub: PubSubEngine,\n\n @inject('Logger')\n logger: CdmLogger.ILogger,\n ) {\n this.logger = logger;\n }\n\n public async getTimeRecords(orgId: string, userId: string): Promise<Array<ITimeRecord>> {\n return this.timeRecordRepository.getTimeRecords(orgId, userId);\n }\n\n public async getDurationTimeRecords(\n orgId: string,\n startTime: Date,\n endTime: Date,\n userId?: string,\n ): Promise<Array<ITimeRecord>> {\n const timeRecords = await this.timeRecordRepository.getTimeRecords(orgId, userId, startTime, endTime);\n return timeRecords.filter((r) => r.endTime !== null);\n }\n\n public async getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord> {\n return this.timeRecordRepository.getPlayingTimeRecord(userId, orgId);\n }\n\n public async createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest) {\n const data = await this.timeRecordRepository.createTimeRecord(userId, orgId, request);\n if (data) {\n const record = {\n orgName: data.orgId,\n userId: data.userId,\n mutation: ITimeRecordPubSubEvents.TimeRecordCreated,\n timeRecord: data,\n };\n this.pubsub.publish(ITimeRecordPubSubEvents.TimeRecordCreated, { SubscribeToTimeTracker: record });\n }\n return (data as any)._id;\n }\n\n public async updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest) {\n const data = await this.timeRecordRepository.updateTimeRecord(userId, orgId, recordId, request);\n if (data) {\n const record = {\n orgName: data.orgId,\n userId: data.userId,\n mutation: ITimeRecordPubSubEvents.TimeRecordUpdated,\n timeRecord: data,\n };\n this.pubsub.publish(ITimeRecordPubSubEvents.TimeRecordUpdated, { SubscribeToTimeTracker: record });\n }\n return true;\n }\n\n public async removeTimeRecord(userId: string, orgId: string, recordId: string) {\n const data = await this.timeRecordRepository.removeTimeRecord(userId, orgId, recordId);\n const record = {\n orgName: data.orgId,\n userId: data.userId,\n mutation: ITimeRecordPubSubEvents.TimeRecordDeleted,\n timeRecord: data,\n };\n this.pubsub.publish(ITimeRecordPubSubEvents.TimeRecordDeleted, { SubscribeToTimeTracker: record });\n return true;\n }\n\n public async removeDurationTimeRecords(\n userId: string,\n orgId: string,\n startTime: Date,\n endTime: Date,\n projectId: string,\n ) {\n return this.timeRecordRepository.removeDurationTimeRecords(userId, orgId, startTime, endTime, projectId);\n }\n\n public async approveTimeRecords(orgId: string, sheetId: string, startDate: Date, endDate: Date) {\n this.timeRecordRepository.approveTimeRecords(orgId, sheetId, startDate, endDate);\n }\n\n public async disapproveTimeRecords(orgId: string, sheetId: string) {\n this.timeRecordRepository.disapproveTimeRecords(orgId, sheetId);\n }\n}\n","/* eslint-disable class-methods-use-this */\nimport * as ILogger from 'bunyan';\nimport { inject, injectable, tagged } from 'inversify';\nimport { ITimesheetState, ITimesheetCreateRequest, ITimeRecord } from '@admin-layout/timetracker-core';\nimport {\n ConfigurationTarget,\n generateOrgUri,\n IConfigFragmentName,\n ServerTypes,\n IPreferencesService,\n} from '@adminide-stack/core';\nimport { IMailServiceAction, IMailerServicesendArgs, IMoleculerServiceName } from '@container-stack/mailing-api';\nimport * as moment from 'moment';\nimport { ServiceBroker, CallingOptions } from 'moleculer';\nimport { CommonType, TaggedType } from '@common-stack/core';\nimport { TYPES, EmailTemplateCodes } from '../constants';\nimport { config } from '../config';\nimport { ITimesheetService } from '../interfaces/timesheet-service';\nimport { ITimesheetRepository, ITimeRecordRepository } from '../interfaces';\n\n@injectable()\nexport class TimesheetService implements ITimesheetService {\n private logger: ILogger;\n\n constructor(\n @inject(TYPES.ITimesheetRepository)\n protected timesheetRepository: ITimesheetRepository,\n\n @inject(TYPES.ITimeRecordRepository)\n protected timeRecordRepository: ITimeRecordRepository,\n\n @inject(TYPES.ITimeRecordService)\n protected timeRecordService: ITimeRecordRepository,\n\n @inject(ServerTypes.IPreferenceEditorService)\n private preferencesService: IPreferencesService,\n\n @inject(CommonType.MOLECULER_BROKER)\n private broker: ServiceBroker,\n\n @inject('Settings')\n @tagged(TaggedType.MICROSERVICE, true)\n private settings: any,\n @inject('Logger')\n logger: ILogger,\n ) {\n this.logger = logger;\n }\n\n public async getTimesheets(orgId: string, userId?: string) {\n return this.timesheetRepository.getTimesheets(orgId, userId);\n }\n\n public async getTimesheetsWithTotalHours(orgId: string, userId?: string) {\n const timesheets = await this.timesheetRepository.getTimesheets(orgId, userId);\n const timeRecords: (ITimeRecord & { _id?: Object })[] = await this.timeRecordRepository.getTimeRecords(orgId, userId);\n return timesheets.map((timesheet) => {\n const sheetTotalDuration = timeRecords\n .filter(\n (tr) =>\n timesheet.timeRecordsId?.includes(tr._id.toString()),\n )\n .reduce(\n (duration, tr) =>\n duration + Math.floor((moment(tr.endTime).valueOf() - moment(tr.startTime).valueOf()) / 1000),\n 0,\n );\n return {\n id: timesheet.id,\n startDate: timesheet.startDate,\n endDate: timesheet.endDate,\n state: timesheet.state,\n userId: timesheet.userId,\n orgId,\n approvedBy: timesheet.approvedBy,\n approvedOn: timesheet.approvedOn,\n submittedOn: timesheet.submittedOn,\n updatedBy: timesheet.updatedBy,\n updatedOn: timesheet.updatedOn,\n totalDuration: sheetTotalDuration,\n };\n });\n }\n\n public async getDurationTimesheets(orgId: string, start: Date, end: Date) {\n const timesheets = await this.timesheetRepository.getOrganizationTimesheets(orgId);\n return timesheets.filter(\n (sh) =>\n moment(start).format('YYYY-MM-DD') === moment(sh.startDate).format('YYYY-MM-DD') &&\n moment(end).format('YYYY-MM-DD') === moment(sh.endDate).format('YYYY-MM-DD'),\n );\n }\n\n public async createTimesheet(userId: string, orgId: string, request: ITimesheetCreateRequest) {\n return this.timesheetRepository.createTimesheet(userId, orgId, request);\n }\n\n public async updateTimesheet(\n userId: string,\n orgId: string,\n sheetId: string,\n request: ITimesheetCreateRequest,\n userContext?: any,\n ) {\n try {\n await this.timesheetRepository.updateTimesheet(orgId, sheetId, request);\n if (request.state === ITimesheetState.APPROVED) {\n // approve time records from startDate to endDate\n this.timeRecordService.approveTimeRecords(orgId, sheetId, request.startDate, request.endDate);\n } else if (request.state === ITimesheetState.DENYED) {\n // approve time records from startDate to endDate\n this.timeRecordService.disapproveTimeRecords(orgId, sheetId);\n }\n const resourceUri = generateOrgUri(orgId, IConfigFragmentName.settings);\n const { settings } = (await this.preferencesService.viewerSettings({\n target: ConfigurationTarget.ORGANIZATION_RESOURCE,\n settingsResource: resourceUri,\n })) as any;\n if (\n request.state === ITimesheetState.APPROVED &&\n settings.timetracker.notifications.approvalNotifications &&\n settings.timetracker.notifications.enableTimetrackerNotifications\n ) {\n const mailTopic = 'Timsheet approved';\n const mailTo = userContext.emailId;\n const mailFrom = config.MAIL_SEND_DEFAULT_EMAIL;\n const templateId = EmailTemplateCodes.TIMESHEET_APPROVAL;\n const templateVars = {\n name: userContext.username,\n startDate: moment(request.startDate).format('YYYY-MM-DD'),\n endDate: moment(request.endDate).format('YYYY-MM-DD'),\n timesheet_url: `${config.CLIENT_URL}/${orgId}/time-tracker/timeapproval`,\n contact_url: `${config.CLIENT_URL}`,\n };\n this.sendMail(mailTopic, mailTo, mailFrom, templateId, templateVars);\n }\n if (\n request.state === ITimesheetState.SUBMITTED &&\n settings.timetracker.notifications.submitNotifications &&\n settings.timetracker.notifications.enableTimetrackerNotifications\n ) {\n const mailTopic = 'Timsheet submitted';\n const mailTo = userContext.emailId;\n const mailFrom = config.MAIL_SEND_DEFAULT_EMAIL;\n const templateId = EmailTemplateCodes.SUBMIT_TIME;\n const templateVars = {\n name: userContext.username,\n startDate: moment(request.startDate).format('YYYY-MM-DD'),\n endDate: moment(request.endDate).format('YYYY-MM-DD'),\n timesheet_url: `${config.CLIENT_URL}/${orgId}/time-tracker/timeapproval`,\n contact_url: `${config.CLIENT_URL}`,\n };\n this.sendMail(mailTopic, mailTo, mailFrom, templateId, templateVars);\n\n return true;\n }\n } catch (e) {\n throw new Error(e.message);\n }\n }\n\n public async updateTimesheetStatus(orgId: string, sheetId: string, state: ITimesheetState) {\n try {\n const timesheet = await this.timesheetRepository.updateTimesheetStatus(orgId, sheetId, state);\n console.log('updateTimesheetStatus.timesheet =>', timesheet);\n if (state === ITimesheetState.APPROVED) {\n // approve time records from startDate to endDate\n console.log('APPROVED');\n }\n\n return true;\n } catch (e) {\n throw new Error(e.message);\n }\n }\n\n public async removeTimesheet(userId: string, orgId: string, sheetId: string) {\n return this.timesheetRepository.removeTimesheet(userId, orgId, sheetId);\n }\n\n private sendMail(topic, to, from, templateId, templateVars) {\n return this.callAction<void, IMailerServicesendArgs>(\n IMailServiceAction.send,\n {\n request: {\n topic,\n to,\n templateId,\n from,\n variables: templateVars,\n },\n },\n IMoleculerServiceName.MailService,\n );\n }\n\n private async callAction<T, P = any>(command: string, params?: P, topic?: string, opts?: CallingOptions) {\n return this.broker.call<T, P>(`${topic}.${command}@${this.settings.adminApiNamespace}`, params, opts);\n }\n}\n","import { Schema, Model, Document, Connection } from 'mongoose';\nimport { ITimeRecord } from '@admin-layout/timetracker-core';\n\nexport declare type Maybe<T> = T | null;\n\nexport interface ITimeRecordModel extends ITimeRecord, Document {\n id?: any;\n}\n\nconst PauseStatusSchema = new Schema({\n pausedTime: { type: Date },\n restartTime: { type: Date },\n});\n\n// ===> TimeRecord\nconst TimeRecordSchema = new Schema({\n orgId: { type: String, index: true },\n userId: { type: String, index: true },\n startTime: { type: Date },\n endTime: { type: Date, default: null },\n taskName: { type: String },\n description: { type: String },\n taskId: { type: String }, // ----> task\n tags: { type: [String] },\n isBillable: { type: Boolean },\n projectId: { type: String }, // ----> project\n timesheetId: { type: String }, // ----> timesheet\n isPause: { type: Boolean, default: false },\n isTimeout: { type: Boolean, default: false },\n pauseStatus: { type: [PauseStatusSchema] }\n});\n\nTimeRecordSchema.index({ endTime: 1, startTime: 1, userId: 1 } as any);\n\nTimeRecordSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimeRecordSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimeRecordSchema.set('toObject', { virtuals: true });\n\nexport type TimeRecordsModelType = Model<ITimeRecordModel>;\n\nexport const TimeRecordsModelFunc: (db: Connection) => TimeRecordsModelType = (db) =>\n db.model<ITimeRecordModel>('timerecords', TimeRecordSchema);\n","import { Schema, Model, Document, Connection } from 'mongoose';\nimport { ITimesheets, ITimesheet } from '@admin-layout/timetracker-core';\n\nexport declare type Maybe<T> = T | null;\n\nexport interface ITimeSheetModel extends ITimesheet, Document {\n id?: any;\n}\nexport interface ITimesheetsModel extends ITimesheets, Document {\n id: any;\n timesheets: ITimeSheetModel[];\n}\n\nenum TimesheetState {\n OPEN,\n APPROVED_PENDING,\n APPROVED,\n APPROVED_FINALIZED,\n DENYED,\n SUBMITTED,\n DENYED_FINALIZED,\n}\n\n// ===> Timesheet\nconst TimesheetSchema = new Schema({\n userId: { type: String, index: true },\n startDate: { type: Date },\n endDate: { type: Date },\n state: { type: TimesheetState },\n submittedOn: { type: Date },\n approvedOn: { type: Date },\n approvedBy: { type: String },\n updatedBy: { type: String },\n updatedOn: { type: Date },\n timeRecordsId: { type: [String] },\n});\n\nconst TimesheetsSchema = new Schema({\n orgId: { type: String, index: true },\n timesheets: [TimesheetSchema],\n});\n\nTimesheetsSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimesheetsSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimesheetsSchema.set('toObject', { virtuals: true });\n\nexport type TimesheetsModelType = Model<ITimesheetsModel>;\n\nexport const TimesheetsModelFunc: (db: Connection) => TimesheetsModelType = (db) =>\n db.model<ITimesheetsModel>('timesheets', TimesheetsSchema);\n","/* eslint-disable no-underscore-dangle */\nimport { Schema, Model, Document, Connection } from 'mongoose';\nimport { ITimeTracker, ITimeRecord, ITimesheet } from '@admin-layout/timetracker-core';\n\nexport declare type Maybe<T> = T | null;\n\nexport interface ITimeRecordModel extends ITimeRecord, Document {\n id?: any;\n}\nexport interface ITimeSheetModel extends ITimesheet, Document {\n id?: any;\n}\nexport interface ITimeTrackerModel extends ITimeTracker, Document {\n id: any;\n timeRecords: ITimeRecordModel[];\n timesheets: ITimeSheetModel[];\n}\n\nenum TimesheetState {\n OPEN,\n APPROVED_PENDING,\n APPROVED,\n APPROVED_FINALIZED,\n DENYED,\n SUBMITTED,\n DENYED_FINALIZED,\n}\n\nconst TimeActivitySchema = new Schema({\n count: { type: Number },\n isPaused: { type: Boolean },\n isTimeout: { type: Boolean },\n startTime: { type: Number },\n endTime: { type: Number },\n});\n\nconst PauseStatusSchema = new Schema({\n pausedTime: { type: Date },\n restartTime: { type: Date },\n});\n\n// ===> TimeRecord\nconst TimeRecordSchema = new Schema({\n userId: { type: String, index: true },\n startTime: { type: Date },\n endTime: { type: Date, default: null },\n taskName: { type: String },\n description: { type: String },\n taskId: { type: String }, // ----> task\n tags: { type: [String] },\n isBillable: { type: Boolean },\n projectId: { type: String }, // ----> project\n timesheetId: { type: String }, // ----> timesheet\n activities: [TimeActivitySchema],\n isPause: { type: Boolean, default: false },\n isTimeout: { type: Boolean, default: false },\n pauseStatus: { type: [PauseStatusSchema] }\n});\n\nTimeRecordSchema.index({ endTime: 1, startTime: 1, userId: 1 } as any);\n\n// ===> Timesheet\nconst TimesheetSchema = new Schema({\n userId: { type: String, index: true },\n startDate: { type: Date },\n endDate: { type: Date },\n state: { type: TimesheetState },\n submittedOn: { type: Date },\n approvedOn: { type: Date },\n approvedBy: { type: String },\n updatedBy: { type: String },\n updatedOn: { type: Date },\n timeRecordsId: { type: [String] },\n});\n\nconst TimeTrackerSchema = new Schema({\n orgId: { type: String, index: true },\n timeRecords: [TimeRecordSchema],\n timesheets: [TimesheetSchema],\n});\n\nTimeRecordSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimeRecordSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimeTrackerSchema.virtual('id').get(function () {\n return this._id.toHexString();\n});\n\nTimeTrackerSchema.set('toJSON', {\n virtuals: true,\n});\n\nTimeTrackerSchema.set('toObject', { virtuals: true });\n\nexport type TimeTrackerModelType = Model<ITimeTrackerModel>;\n\nexport const TimeTrackerModelFunc: (db: Connection) => TimeTrackerModelType = (db) =>\n db.model<ITimeTrackerModel>('timetracker', TimeTrackerSchema);\n","export * from './timerecord-repository';\nexport * from './timesheet-repository';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-param-reassign */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable no-underscore-dangle */\nimport * as Logger from 'bunyan';\nimport { injectable, inject } from 'inversify';\nimport * as mongoose from 'mongoose';\nimport { ITimeRecordRequest, ITimeRecord } from '@admin-layout/timetracker-core';\nimport { ITimeRecordRepository } from '../../interfaces';\nimport { TimeRecordsModelFunc, TimeRecordsModelType, ITimeRecordModel } from '../models/timerecords-model';\nimport * as _ from 'lodash';\n\n@injectable()\nexport class TimeRecordRepository implements ITimeRecordRepository {\n private timeRecordsModel: TimeRecordsModelType;\n\n private logger: Logger;\n\n constructor(\n @inject('MongoDBConnection')\n db: mongoose.Connection,\n @inject('Logger')\n logger: Logger,\n ) {\n this.logger = logger.child({ className: 'TimeRecordRepository' });\n this.timeRecordsModel = TimeRecordsModelFunc(db);\n }\n\n public async getTimeRecords(\n orgId: string, userId?: string | RegExp, from?: Date, until?: Date\n ): Promise<Array<ITimeRecord>> {\n if (!userId) {\n userId = /.*/;\n }\n let match: any = {\n 'userId': userId,\n };\n if (from) {\n match = { ...match, 'startTime': { $gte: from } };\n }\n if (until) {\n match = { ...match, 'endTime': { $lte: until } };\n }\n\n const result = await this.timeRecordsModel.aggregate([\n {\n $match: {\n orgId,\n },\n },\n {\n $match: {\n ...match,\n },\n },\n ]);\n if (result.length === 0) {\n return [];\n }\n return result;\n }\n\n public async getOrganizationTimeRecords(orgId: string): Promise<ITimeRecordModel[]> {\n const trackDoc = await this.timeRecordsModel.find({ orgId });\n if (trackDoc) {\n return trackDoc;\n }\n return [];\n }\n\n public async getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord> {\n const trackDoc = await this.timeRecordsModel.find({ orgId });\n if (trackDoc) {\n let res;\n if (trackDoc) res = trackDoc.find((tr) => tr.userId === userId && tr.endTime === null);\n return res;\n }\n return null;\n }\n\n public async createTimeRecord(\n userId: string,\n orgId: string,\n request: ITimeRecordRequest,\n ): Promise<Partial<ITimeRecord>> {\n try {\n const response = await this.timeRecordsModel.create({ ...request, orgId, userId });\n return response.toObject() as ITimeRecordModel;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async updateTimeRecord(\n userId: string,\n orgId: string,\n recordId: string,\n request: ITimeRecordRequest,\n ): Promise<Partial<ITimeRecordModel>> {\n try {\n if (recordId === null || recordId === undefined) throw new Error('TimeRecord id not specified!');\n const response = await this.timeRecordsModel.findOneAndUpdate(\n { orgId, _id: recordId },\n {\n $set: {\n ...request,\n },\n },\n {\n new: true,\n },\n );\n return response?.toObject() as ITimeRecordModel;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async removeTimeRecord(userId: string, orgId: string, recordId: string) {\n try {\n const result = await this.timeRecordsModel.remove({ userId, orgId, _id: recordId });\n if (result.n !== 1) {\n throw new Error('TimeRecord is not modified');\n }\n return { userId, orgId, _id: recordId };\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async removeDurationTimeRecords(\n userId: string,\n orgId: string,\n startTime: Date,\n endTime: Date,\n projectId: string,\n ) {\n try {\n const trackerDoc = await this.timeRecordsModel.find({ orgId });\n if (trackerDoc && trackerDoc.length > 0) {\n const timeRecords = trackerDoc.filter(\n (tr) => tr.startTime < startTime || tr.startTime > endTime || tr.projectId !== projectId,\n );\n for (const record of timeRecords) {\n await this.timeRecordsModel.remove({ _id: record._id });\n }\n return true;\n }\n return false;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async approveTimeRecords(orgId: string, sheetId: string, startDate: Date, endDate: Date) {\n try {\n await this.timeRecordsModel.updateMany(\n {\n orgId,\n },\n { $set: { 'timesheetId': sheetId } },\n {\n multi: true,\n arrayFilters: [\n {\n 'startTime': { $gte: startDate },\n 'endTime': { $lte: endDate },\n 'timesheetId': null,\n },\n ],\n },\n );\n } catch (e) {\n this.logger.debug('approveTimeRecords =>', e.message);\n throw new Error(e.message);\n }\n }\n\n public async disapproveTimeRecords(orgId: string, sheetId: string) {\n try {\n await this.timeRecordsModel.updateMany(\n {\n orgId,\n },\n { $set: { 'timesheetId': null } },\n {\n multi: true,\n arrayFilters: [\n {\n 'timesheetId': sheetId,\n },\n ],\n },\n );\n } catch (e) {\n this.logger.debug('disapproveTimeRecords =>', e.message);\n throw new Error(e.message);\n }\n }\n}\n","import * as Logger from 'bunyan';\nimport { injectable, inject } from 'inversify';\nimport * as mongoose from 'mongoose';\nimport { ITimesheetCreateRequest, ITimesheetState } from '@admin-layout/timetracker-core';\nimport * as _ from 'lodash';\nimport { CommonType } from '@common-stack/core';\nimport { ServiceBroker } from 'moleculer';\nimport { TimesheetsModelFunc, TimesheetsModelType, ITimeSheetModel } from '../models/timesheets-model';\nimport { ITimesheetRepository } from '../../interfaces';\n\n@injectable()\nexport class TimesheetRepository implements ITimesheetRepository {\n private timesheetsModel: TimesheetsModelType;\n\n private logger: Logger;\n\n constructor(\n @inject('MongoDBConnection')\n db: mongoose.Connection,\n @inject('Logger')\n logger: Logger,\n @inject(CommonType.MOLECULER_BROKER)\n private broker: ServiceBroker,\n ) {\n this.logger = logger.child({ className: 'TimesheetRepository' });\n this.timesheetsModel = TimesheetsModelFunc(db);\n }\n\n public async getOrganizationTimesheets(orgId: string): Promise<ITimeSheetModel[]> {\n const trackDoc = await this.timesheetsModel.findOne({ orgId });\n if (trackDoc && trackDoc.timesheets) {\n return trackDoc.timesheets;\n }\n return [];\n }\n\n public async getTimesheets(orgId: string, userId?: string): Promise<ITimeSheetModel[]> {\n const timesheets = await this.getOrganizationTimesheets(orgId);\n return timesheets.filter((sheet) => !userId || sheet.userId === userId);\n }\n\n public async createTimesheet(userId: string, orgId: string, request: ITimesheetCreateRequest): Promise<boolean> {\n try {\n const response = await this.timesheetsModel.update(\n { orgId },\n { $push: { timesheets: request } },\n { upsert: true },\n );\n return true;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async updateTimesheet(orgId: string, sheetId: string, request: ITimesheetCreateRequest) {\n try {\n let setRequest = {};\n _.forIn(request,(value, key) => {\n setRequest = {\n ...setRequest,\n [`timesheets.$.${key}`]: value,\n };\n });\n const response = await this.timesheetsModel.update(\n { orgId, timesheets: { $elemMatch: { _id: sheetId } } },\n { $set: { ...setRequest } },\n );\n return response;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async updateTimesheetStatus(orgId: string, sheetId: string, state: ITimesheetState) {\n try {\n const response = await this.timesheetsModel.update(\n {\n orgId,\n $elemMatch: { 'timesheets.id': sheetId },\n },\n {\n $set: {\n 'timesheets.$.status': state,\n },\n },\n );\n return response;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n\n public async removeTimesheet(userId: string, orgId: string, sheetId: string): Promise<boolean> {\n try {\n await this.timesheetsModel.update(\n {\n orgId,\n },\n {\n $pull: { timesheets: { _id: sheetId } },\n },\n );\n return true;\n } catch (err) {\n throw new Error(err.message);\n }\n }\n}\n","module.exports = require(\"@adminide-stack/core\");","module.exports = require(\"@common-stack/core\");","module.exports = require(\"@common-stack/server-core\");","module.exports = require(\"@vscode-alt/monaco-editor/esm/vs/nls\");","module.exports = require(\"@workbench-stack/core\");","module.exports = require(\"envalid\");","module.exports = require(\"graphql-subscriptions\");","module.exports = require(\"inversify\");","module.exports = require(\"lodash\");","module.exports = require(\"moment\");","module.exports = require(\"mongoose\");"],"sourceRoot":""}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ITimeRecordRequest, ITimeRecord
|
|
1
|
+
import { ITimeRecordRequest, ITimeRecord } from '@admin-layout/timetracker-core';
|
|
2
2
|
export interface ITimeRecordRepository {
|
|
3
3
|
getTimeRecords(orgId: string, userId?: string, startTime?: Date, endTime?: Date): Promise<Array<ITimeRecord>>;
|
|
4
4
|
getOrganizationTimeRecords(orgId: string): Promise<Array<ITimeRecord>>;
|
|
5
5
|
getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord>;
|
|
6
|
-
createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest): Promise<Partial<
|
|
7
|
-
updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest): Promise<Partial<
|
|
8
|
-
removeTimeRecord(userId: string, orgId: string, recordId: string): Promise<Partial<
|
|
6
|
+
createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest): Promise<Partial<ITimeRecord>>;
|
|
7
|
+
updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest): Promise<Partial<ITimeRecord>>;
|
|
8
|
+
removeTimeRecord(userId: string, orgId: string, recordId: string): Promise<Partial<ITimeRecord>>;
|
|
9
9
|
removeDurationTimeRecords(userId: string, orgId: string, startTime: Date, endTime: Date, projectId: string): Promise<boolean>;
|
|
10
10
|
approveTimeRecords(orgId: string, sheetId: string, startDate: Date, endDate: Date): any;
|
|
11
11
|
disapproveTimeRecords(orgId: string, sheetId: string): any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ITimeRecord, ITimeRecordRequest
|
|
1
|
+
import { ITimeRecord, ITimeRecordRequest } from '@admin-layout/timetracker-core';
|
|
2
2
|
export interface ITimeRecordService {
|
|
3
3
|
getTimeRecords(orgId: string, userId?: string): Promise<Array<ITimeRecord>>;
|
|
4
4
|
getDurationTimeRecords(orgId: string, startTime: Date, endTime: Date, userId?: string): Promise<Array<ITimeRecord>>;
|
|
5
5
|
getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord>;
|
|
6
|
-
createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest): Promise<Partial<
|
|
6
|
+
createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest): Promise<Partial<ITimeRecord>>;
|
|
7
7
|
updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest): Promise<boolean>;
|
|
8
8
|
removeTimeRecord(userId: string, orgId: string, recordId: string): Promise<boolean>;
|
|
9
9
|
removeDurationTimeRecords(userId: string, orgId: string, startTime: Date, endTime: Date, projectId: string): Promise<boolean>;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { Model, Document, Connection } from 'mongoose';
|
|
2
|
-
import {
|
|
2
|
+
import { ITimeRecord } from '@admin-layout/timetracker-core';
|
|
3
3
|
export declare type Maybe<T> = T | null;
|
|
4
4
|
export interface ITimeRecordModel extends ITimeRecord, Document {
|
|
5
5
|
id?: any;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
id: any;
|
|
9
|
-
timeRecords: ITimeRecordModel[];
|
|
10
|
-
}
|
|
11
|
-
export declare type TimeRecordsModelType = Model<ITimeRecordsModel>;
|
|
7
|
+
export declare type TimeRecordsModelType = Model<ITimeRecordModel>;
|
|
12
8
|
export declare const TimeRecordsModelFunc: (db: Connection) => TimeRecordsModelType;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as Logger from 'bunyan';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
|
-
import { ITimeRecordRequest, ITimeRecord
|
|
3
|
+
import { ITimeRecordRequest, ITimeRecord } from '@admin-layout/timetracker-core';
|
|
4
4
|
import { ITimeRecordRepository } from '../../interfaces';
|
|
5
|
-
import { ITimeRecordModel
|
|
5
|
+
import { ITimeRecordModel } from '../models/timerecords-model';
|
|
6
6
|
export declare class TimeRecordRepository implements ITimeRecordRepository {
|
|
7
7
|
private timeRecordsModel;
|
|
8
8
|
private logger;
|
|
@@ -10,12 +10,12 @@ export declare class TimeRecordRepository implements ITimeRecordRepository {
|
|
|
10
10
|
getTimeRecords(orgId: string, userId?: string | RegExp, from?: Date, until?: Date): Promise<Array<ITimeRecord>>;
|
|
11
11
|
getOrganizationTimeRecords(orgId: string): Promise<ITimeRecordModel[]>;
|
|
12
12
|
getPlayingTimeRecord(userId: string, orgId: string): Promise<ITimeRecord>;
|
|
13
|
-
createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest): Promise<Partial<
|
|
14
|
-
updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest): Promise<Partial<
|
|
13
|
+
createTimeRecord(userId: string, orgId: string, request: ITimeRecordRequest): Promise<Partial<ITimeRecord>>;
|
|
14
|
+
updateTimeRecord(userId: string, orgId: string, recordId: string, request: ITimeRecordRequest): Promise<Partial<ITimeRecordModel>>;
|
|
15
15
|
removeTimeRecord(userId: string, orgId: string, recordId: string): Promise<{
|
|
16
16
|
userId: string;
|
|
17
17
|
orgId: string;
|
|
18
|
-
|
|
18
|
+
_id: string;
|
|
19
19
|
}>;
|
|
20
20
|
removeDurationTimeRecords(userId: string, orgId: string, startTime: Date, endTime: Date, projectId: string): Promise<boolean>;
|
|
21
21
|
approveTimeRecords(orgId: string, sheetId: string, startDate: Date, endDate: Date): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/timetracker-module-server",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.31",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@admin-layout/timetracker-core": "1.0.3-alpha.
|
|
41
|
+
"@admin-layout/timetracker-core": "1.0.3-alpha.31",
|
|
42
42
|
"@container-stack/mailing-api": "^0.0.26-61",
|
|
43
43
|
"humanize-duration": "^3.24.0",
|
|
44
44
|
"moment": "^2.29.1"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"typescript": {
|
|
61
61
|
"definition": "lib/index.d.ts"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "337e5f7d25e61d3be03a6833e83650b9ae5c4851"
|
|
64
64
|
}
|