hino / app / routes / dms-print-gate-pass / edit.js
edit.js
Raw
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';

import BaseRoute from 'hino-hearts/routes/base';

export default BaseRoute.extend({
	dmsPrintGatePass : service(),
	dmsPrintGatePassData : service(),
	store : service(),

	init() {
		this._super(...arguments);
	},

	async model(params) {
		this.dmsPrintGatePass.setModel(null);
		return await this.dmsPrintGatePassData.getData(params.id)
		.then(response => {
			this.dmsPrintGatePass.setModel(response);
			return response;
		});
	},

	templateName : 'dms-print-gate-pass/input'});