Skip to content

Commit

Permalink
update mock server data
Browse files Browse the repository at this point in the history
  • Loading branch information
deekshas8 committed Mar 21, 2022
1 parent c2e8f7c commit 0f10e30
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 99 deletions.
32 changes: 17 additions & 15 deletions business-partner/business-partner-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* - for multi-valued propeties: { "results": [] }
* - for single-valued properties: null
*/
const moment = require('moment');
const yearMonth = moment().format('YYYY.MM');
module.exports = {
data: [
{
Expand All @@ -25,7 +27,7 @@ module.exports = {
"BusinessPartnerUUID": "00163e30-4e2a-1ed8-8483-a08c52249f04",
"CorrespondenceLanguage": "",
"CreatedByUser": "CC0000000002",
"CreationDate": "/Date(1518393600000)/",
"CreationDate": `/Date(${new Date( moment(1518393600000).format(yearMonth + ".DD") ).getTime()})/`,
"CreationTime": "PT17H49M05S",
"FirstName": "John",
"FormOfAddress": "",
Expand Down Expand Up @@ -78,8 +80,8 @@ module.exports = {
},
"BusinessPartner": "1003764",
"AddressID": "28238",
"ValidityStartDate": "/Date(1518393600000+0000)/",
"ValidityEndDate": "/Date(253402300799000+0000)/",
"ValidityStartDate":`/Date(${new Date( moment(1518393600000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"ValidityEndDate": `/Date(${new Date( moment(253402300799000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"AuthorizationGroup": "",
"AddressUUID": "00163e30-4e2a-1ed8-8483-a08c5224bf04",
"AdditionalStreetPrefixName": "",
Expand Down Expand Up @@ -151,7 +153,7 @@ module.exports = {
"BusinessPartnerUUID": "00163e30-4e2a-1ed8-8483-a0a5f4c2bf04",
"CorrespondenceLanguage": "",
"CreatedByUser": "CC0000000002",
"CreationDate": "/Date(1518393600000)/",
"CreationDate": `/Date(${new Date( moment(1518393600000).format(yearMonth + ".DD") ).getTime()})/`,
"CreationTime": "PT17H49M06S",
"FirstName": "Jane",
"FormOfAddress": "",
Expand Down Expand Up @@ -204,8 +206,8 @@ module.exports = {
},
"BusinessPartner": "1003765",
"AddressID": "28241",
"ValidityStartDate": "/Date(1518393600000+0000)/",
"ValidityEndDate": "/Date(253402300799000+0000)/",
"ValidityStartDate": `/Date(${new Date( moment(1518393600000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"ValidityEndDate": `/Date(${new Date( moment(253402300799000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"AuthorizationGroup": "",
"AddressUUID": "00163e30-4e2a-1ed8-8483-a0a5f4c2df04",
"AdditionalStreetPrefixName": "",
Expand Down Expand Up @@ -277,7 +279,7 @@ module.exports = {
"BusinessPartnerUUID": "00163e30-4e2a-1ed8-8483-a0b2387e1f04",
"CorrespondenceLanguage": "",
"CreatedByUser": "CC0000000002",
"CreationDate": "/Date(1518393600000)/",
"CreationDate": `/Date(${new Date( moment(1518393600000).format(yearMonth + ".DD") ).getTime()})/`,
"CreationTime": "PT17H49M07S",
"FirstName": "John",
"FormOfAddress": "",
Expand Down Expand Up @@ -330,8 +332,8 @@ module.exports = {
},
"BusinessPartner": "1003766",
"AddressID": "28244",
"ValidityStartDate": "/Date(1518393600000+0000)/",
"ValidityEndDate": "/Date(253402300799000+0000)/",
"ValidityStartDate": `/Date(${new Date( moment(1518393600000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"ValidityEndDate": `/Date(${new Date( moment(253402300799000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"AuthorizationGroup": "",
"AddressUUID": "00163e30-4e2a-1ed8-8483-a0b2387e3f04",
"AdditionalStreetPrefixName": "",
Expand Down Expand Up @@ -403,7 +405,7 @@ module.exports = {
"BusinessPartnerUUID": "00163e30-4e2a-1ed8-8483-a0c9ef089f04",
"CorrespondenceLanguage": "",
"CreatedByUser": "CC0000000002",
"CreationDate": "/Date(1518393600000)/",
"CreationDate": `/Date(${new Date( moment(1518393600000).format(yearMonth + ".DD") ).getTime()})/`,
"CreationTime": "PT17H49M08S",
"FirstName": "Carla",
"FormOfAddress": "",
Expand All @@ -415,7 +417,7 @@ module.exports = {
"IsNaturalPerson": "X",
"IsSexUnknown": false,
"Language": "",
"LastChangeDate": "/Date(1519084800000)/",
"LastChangeDate": `/Date(${new Date( moment(1519084800000).format(yearMonth + ".DD") ).getTime()})/`,
"LastChangeTime": "PT12H30M13S",
"LastChangedByUser": "CC0000000002",
"LastName": "Coe",
Expand Down Expand Up @@ -456,8 +458,8 @@ module.exports = {
},
"BusinessPartner": "1003767",
"AddressID": "28247",
"ValidityStartDate": "/Date(1518393600000+0000)/",
"ValidityEndDate": "/Date(253402300799000+0000)/",
"ValidityStartDate": `/Date(${new Date( moment(1518393600000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"ValidityEndDate": `/Date(${new Date( moment(253402300799000+0000).format(yearMonth + ".DD") ).getTime()})/`,
"AuthorizationGroup": "",
"AddressUUID": "00163e30-4e2a-1ed8-8483-a0c9ef08bf04",
"AdditionalStreetPrefixName": "",
Expand Down Expand Up @@ -529,7 +531,7 @@ module.exports = {
"BusinessPartnerUUID": "00163e30-4e2a-1ed8-8483-a0c9ef089f05",
"CorrespondenceLanguage": "",
"CreatedByUser": "CC0000000002",
"CreationDate": "/Date(1518393600000)/",
"CreationDate":`/Date(${new Date( moment(1518393600000).format(yearMonth + ".DD") ).getTime()})/`,
"CreationTime": "PT17H49M08S",
"FirstName": "",
"FormOfAddress": "",
Expand All @@ -541,7 +543,7 @@ module.exports = {
"IsNaturalPerson": "",
"IsSexUnknown": false,
"Language": "",
"LastChangeDate": "/Date(1519084800000)/",
"LastChangeDate": `/Date(${new Date( moment(1519084800000).format(yearMonth + ".DD") ).getTime()})/`,
"LastChangeTime": "PT12H30M13S",
"LastChangedByUser": "CC0000000002",
"LastName": "",
Expand Down
3 changes: 2 additions & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ applications:
memory: 64M
buildpacks:
- nodejs_buildpack
random-route: true
routes:
- route: 'odata-mock-server.internal.cfapps.sap.hana.ondemand.com'
20 changes: 10 additions & 10 deletions time-off/employee-time.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = [
startDate: `/Date(${new Date( moment(1568851200000).format(yearMonth + ".DD") ).getTime()})/`,
displayQuantity: "3",
quantityInDays: "3",
mdfSystemEffectiveStartDate: "/Date(-2208988800000)/",
mdfSystemEffectiveStartDate: "/Date(2208988800000)/",
mdfSystemStatus: "A",
startTime: null,
loaEndJobInfoId: null,
Expand Down Expand Up @@ -165,7 +165,7 @@ module.exports = [
startDate: `/Date(${new Date( moment(1569196800000).format(yearMonth + ".DD") ).getTime()})/`,
displayQuantity: "3",
quantityInDays: "3",
mdfSystemEffectiveStartDate: "/Date(-2208988800000)/",
mdfSystemEffectiveStartDate: "/Date(2208988800000)/",
mdfSystemStatus: "A",
startTime: null,
loaEndJobInfoId: null,
Expand All @@ -179,7 +179,7 @@ module.exports = [
lastModifiedDateWithTZ: "/Date(1564148716000+0000)/",
workflowRequestId: null,
undeterminedEndDate: null,
userId: "cgrant1",
userId: "cgrant",
mdfSystemTransactionSequence: "1",
recurrenceGroup: null,
createdDate: "/Date(1564134316000)/",
Expand Down Expand Up @@ -305,7 +305,7 @@ module.exports = [
startDate: `/Date(${new Date( moment(1570406400000).format(yearMonth + ".DD") ).getTime()})/`,
displayQuantity: "2",
quantityInDays: "2",
mdfSystemEffectiveStartDate: "/Date(-2208988800000)/",
mdfSystemEffectiveStartDate: "/Date(2208988800000)/",
mdfSystemStatus: "A",
startTime: null,
loaEndJobInfoId: null,
Expand All @@ -319,7 +319,7 @@ module.exports = [
lastModifiedDateWithTZ: "/Date(1564148786000+0000)/",
workflowRequestId: null,
undeterminedEndDate: null,
userId: "smormony1",
userId: "smormony",
mdfSystemTransactionSequence: "1",
recurrenceGroup: null,
createdDate: "/Date(1564134386000)/",
Expand Down Expand Up @@ -445,7 +445,7 @@ module.exports = [
startDate: `/Date(${new Date( moment(1573516800000).format(yearMonth + ".DD") ).getTime()})/`,
displayQuantity: "2",
quantityInDays: "2",
mdfSystemEffectiveStartDate: "/Date(-2208988800000)/",
mdfSystemEffectiveStartDate: "/Date(2208988800000)/",
mdfSystemStatus: "A",
startTime: null,
loaEndJobInfoId: null,
Expand All @@ -459,7 +459,7 @@ module.exports = [
lastModifiedDateWithTZ: "/Date(1564148836000+0000)/",
workflowRequestId: null,
undeterminedEndDate: null,
userId: "mhoff1",
userId: "mhoff",
mdfSystemTransactionSequence: "1",
recurrenceGroup: null,
createdDate: "/Date(1564134436000)/",
Expand Down Expand Up @@ -585,7 +585,7 @@ module.exports = [
startDate: `/Date(${new Date( moment(1566172800000).format(yearMonth + ".DD") ).getTime()})/`,
displayQuantity: "3",
quantityInDays: "3",
mdfSystemEffectiveStartDate: "/Date(-2208988800000)/",
mdfSystemEffectiveStartDate: "/Date(2208988800000)/",
mdfSystemStatus: "A",
startTime: null,
loaEndJobInfoId: null,
Expand All @@ -599,7 +599,7 @@ module.exports = [
lastModifiedDateWithTZ: "/Date(1568106966000+0000)/",
workflowRequestId: null,
undeterminedEndDate: null,
userId: "mhoff1",
userId: "mhoff",
mdfSystemTransactionSequence: "1",
recurrenceGroup: null,
createdDate: "/Date(1568092566000)/",
Expand Down Expand Up @@ -725,7 +725,7 @@ module.exports = [
startDate: `/Date(${new Date( moment(1566172800000).format(yearMonth + ".DD") ).getTime()})/`,
displayQuantity: "3",
quantityInDays: "3",
mdfSystemEffectiveStartDate: "/Date(-2208988800000)/",
mdfSystemEffectiveStartDate: "/Date(2208988800000)/",
mdfSystemStatus: "A",
startTime: null,
loaEndJobInfoId: null,
Expand Down
Loading

0 comments on commit 0f10e30

Please sign in to comment.