diff --git a/server/models/classes/establishment.js b/server/models/classes/establishment.js index 57c4c87340..4478afcaba 100644 --- a/server/models/classes/establishment.js +++ b/server/models/classes/establishment.js @@ -1293,6 +1293,7 @@ class Establishment extends EntityValidator { } const fetchResults = await models.establishment.findOne(fetchQuery); + console.log({ fetchResults: fetchResults }); if (fetchResults && fetchResults.id && Number.isInteger(fetchResults.id)) { // update self - don't use setters because they modify the change state this._isNew = false; diff --git a/server/services/establishment/establishment.js b/server/services/establishment/establishment.js index 68117206c0..d93cfe6182 100644 --- a/server/services/establishment/establishment.js +++ b/server/services/establishment/establishment.js @@ -189,6 +189,7 @@ const addEstablishment = async (req, res) => { // gets requested establishment // optional parameter - "history" must equal "none" (default), "property", "timeline" or "full" const getEstablishment = async (req, res) => { + console.log('getEstablishment request'); const establishmentId = req.params.id; const showHistory = @@ -197,6 +198,12 @@ const getEstablishment = async (req, res) => { const showPropertyHistoryOnly = req.query.history === 'property'; const thisEstablishment = new Establishment.Establishment(req.username); + console.log({ + thisEstablishment: thisEstablishment, + establishmentId: establishmentId, + showHistory: showHistory, + history: req.query.history, + }); try { if (await thisEstablishment.restore(establishmentId, showHistory && req.query.history !== 'property')) { // the property based framework for "other services" and "capacity services" @@ -224,6 +231,7 @@ const getEstablishment = async (req, res) => { } if (!jsonResponse.isParent && jsonResponse.parentUid !== null) { const parentEstablishmentName = await thisEstablishment.fetchParentDetails(jsonResponse.parentUid); + console.log({ parentEstablishmentName: parentEstablishmentName }); if (parentEstablishmentName) { jsonResponse.parentName = parentEstablishmentName.parentName; } diff --git a/src/app/features/workplace/workplace-info-panel/workplace-info-panel.component.ts b/src/app/features/workplace/workplace-info-panel/workplace-info-panel.component.ts index 835f4d248a..1134ada5ec 100644 --- a/src/app/features/workplace/workplace-info-panel/workplace-info-panel.component.ts +++ b/src/app/features/workplace/workplace-info-panel/workplace-info-panel.component.ts @@ -138,6 +138,7 @@ export class WorkplaceInfoPanelComponent implements OnInit, OnDestroy { event.preventDefault(); this.establishmentService.getEstablishment(this.workplace.uid).subscribe((data) => { + console.log({ workplaceDATA: data }); if (data.employerType == null) { this.establishmentService.setEmployerTypeHasValue(false); this.router.navigate(['/workplace', this.workplace.uid, 'type-of-employer']);