Closed KoWeiJAC closed 5 months ago
Describe the bug Sentry TypeError on production https://judicial-appointments-commissi.sentry.io/issues/5176399784/?environment=live&environment=production&project=1792541&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=3
It caused by old firebase lib syntax in the src/views/Exercise/Reports/ReasonableAdjustments.vue, it should use firebase module API
src/views/Exercise/Reports/ReasonableAdjustments.vue
async getOtherApplicationRecords(record) { const firestoreRef = firestore .collection('applicationRecords') .where('candidate.id', '==', record.candidate.id) .where('candidate.reasonableAdjustments', '==', true) .orderBy('exercise.referenceNumber', 'desc'); const snapshot = await firestoreRef.get(); const otherRecords = []; snapshot.forEach(doc => { const data = doc.data(); if (data.exercise.id === record.exercise.id) { otherRecords.unshift(data); // put current exercise first } else { otherRecords.push(data); } }); if (otherRecords.length) { this.otherApplicationRecords.push({ candidateId: record.candidate.id, otherRecords, }); } },
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
Describe the bug Sentry TypeError on production https://judicial-appointments-commissi.sentry.io/issues/5176399784/?environment=live&environment=production&project=1792541&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=3
It caused by old firebase lib syntax in the
src/views/Exercise/Reports/ReasonableAdjustments.vue
, it should use firebase module APITo Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.