87a3bd5393
* ui: create id helper * refact: handle async relationships * chore: prettify template * ui: helper async escape hatch * refact: use escape hatch for tooltip
9 lines
233 B
JavaScript
9 lines
233 B
JavaScript
import Helper from '@ember/component/helper';
|
|
|
|
export function formatID([model, relationship]) {
|
|
const id = model.belongsTo(relationship).id();
|
|
return { id, shortId: id.split('-')[0] };
|
|
}
|
|
|
|
export default Helper.helper(formatID);
|