hino / app / controllers / inbox / inbox-outstanding-dms.js
inbox-outstanding-dms.js
Raw
import Controller from '@ember/controller';
import {computed} from '@ember/object';

export default Controller.extend({
	prevURL: 'inbox.outstanding-transaction-dms',
	// title: 'DMS Outstanding Transaction',
	document_type_code: null,
	queryParams: ['page', 'perPage', 'sort', 'filter', 'inboxfilter'],
	page: 1,
	perPage: 10,
	filter: null,
	inboxfilter: null,
	title: computed('document_type_code', function() {
		let titleValue = '';
		console.log(this.get('document_type_code'));
		switch(this.get('document_type_code')) {
			case 'DMS_PDI_REQUEST': titleValue = 'Outstanding PDI Receipt'; break;
			case 'DMS_TRANSFER_REQUEST': titleValue = 'Outstanding Transfer Request'; break;
			case 'DMS_PURCHASE_ORDER': titleValue = 'Outstanding Purchase Order - On Order'; break;
			case 'DMS_WORK_ORDER': titleValue = 'Outstanding Work Order - QC Pass (Uninvoiced)'; break;
			case 'DMS_OUTSTANDING_PAYMENT': titleValue = 'Outstanding Payment'; break;
			case 'DMS_AGREEMENT_SPARE_PART': titleValue = 'Reminder Agreement Spareparts'; break;
			case 'SALES_ORDER': titleValue = 'Oustanding Sales Order - Approved (Uninvoiced)'; break;
			case 'DMS_AGREEMENT_SERVICE': titleValue = 'Reminder Agreement Service'; break;
			case 'DMS_SALES_ORDER': titleValue = 'Oustanding Sales Order - Approved (Uninvoiced)'; break;

			default: titleValue = 'Outstanding Documents'; break;
		}

		return titleValue;
	})
});