Skip to content

Commit

Permalink
fix: spell referenceLookup correctly
Browse files Browse the repository at this point in the history
This commit fixes a pervasive typo throughout the app where reference
was spelled `refence`.  This has been corrected.
  • Loading branch information
jniles committed Oct 13, 2017
1 parent af33233 commit bccf6b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/modules/templates/bhReferenceLink.tmpl.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a
ng-href="/refenceLookup/{{$ctrl.reference}}/{{$ctrl.languageKey}}"
ng-href="/referenceLookup/{{$ctrl.reference}}/{{$ctrl.languageKey}}"
target="_blank">
{{$ctrl.displayLabel}}
</a>
5 changes: 3 additions & 2 deletions server/config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const dashboardDebtors = require('../controllers/dashboard/debtorGroups');
const stats = require('../controllers/dashboard/stats');

// looking up an entity by it reference
const refenceLookup = require('../lib/referenceLookup');
const referenceLookup = require('../lib/referenceLookup');

// expose routes to the server.
exports.configure = function configure(app) {
Expand Down Expand Up @@ -192,6 +192,7 @@ exports.configure = function configure(app) {
app.put('/general_ledger/comments', generalLedger.commentAccountStatement);

app.get('/transactions/:uuid/history', journal.getTransactionEditHistory);
// app.delete('/transactions/:uuid', transactions.deleteTransaction);

/* fiscal year controller */
app.get('/fiscal', fiscal.list);
Expand Down Expand Up @@ -316,7 +317,7 @@ exports.configure = function configure(app) {
app.get('/invoices/:uuid/balance', patientInvoice.balance);

// interface for linking entities, it renders a report for a particular entity
app.get('/refenceLookup/:codeRef/:language', refenceLookup.getEntity);
app.get('/referenceLookup/:codeRef/:language', referenceLookup.getEntity);

// interface for employee report
app.get('/reports/payroll/employees', employeeReports.employeeRegistrations);
Expand Down
4 changes: 2 additions & 2 deletions server/lib/referenceLookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ indexIdentifiers();
// The table name is variable, it can be :invoice, cash or voucher
function getEntity(req, res, next) {
const codeRef = req.params.codeRef.split('.');
const language = req.params.language;
const { language } = req.params;

const code = codeRef[0];
const projectName = codeRef[1];
Expand Down Expand Up @@ -64,7 +64,7 @@ function getEntity(req, res, next) {
// search for full UUID
db.one(query, [projectName, reference])
.then((entity) => {
const uuid = entity.uuid;
const { uuid } = entity;
const url = `${documentDefinition.documentPath}${uuid}?lang=${language}&renderer=pdf`;

res.redirect(url);
Expand Down

0 comments on commit bccf6b7

Please sign in to comment.