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

export default Controller.extend({
	prevURL: 'inbox.outstanding-approval-dms',
	// title: 'DMS Requested Approval',
	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 'HOYU_SALES_ORDER_APPROVAL': titleValue = 'Hoyu Sales Order Approval'; break;
			case 'HOYU_ORDER_SPLIT_APPROVAL': titleValue = 'Hoyu Order Split Approval'; break;
			case 'HOYU_FAKTUR_APPROVAL': titleValue = 'Hoyu Faktur Approval'; break;
			case 'HOYU_PDI_APPROVAL': titleValue = 'Hoyu PDI Approval'; break;
			case 'HOYU_EVENT_APPROVAL': titleValue = 'Hoyu Event Approval'; break;

			case 'DMS_PURCHASE_ORDER': titleValue = 'DMS Purchase Order Approval'; break;
			case 'DMS_SALES_ORDER': titleValue = 'DMS Sales Order Approval'; break;
			case 'DMS_SALES_ORDER_INVOICE_RETURN': titleValue = 'DMS Sales Order Invoice Return Approval'; break;
			case 'DMS_ASSIGNMENT_LETTER': titleValue = 'DMS Assignment Letter Approval'; break;
			case 'DMS_WORK_ORDER': titleValue = 'DMS Work Order Approval'; break;
			case 'DMS_WORK_ORDER_INVOICE_RETURN': titleValue = 'DMS Work Order Invoice Return Approval'; break;
			case 'DMS_PDI_REQUEST': titleValue = 'DMS PDI Request Approval'; break;
			case 'DMS_STOCK_OPNAME': titleValue = 'DMS Stock Opname Approval'; break;
			case 'DMS_STOCK_ADJUSTMENT': titleValue = 'DMS Stock Adjustment Approval'; break;
			case 'DMS_AGREEMENT_SERVICE': titleValue = 'DMS Agreement Service Approval'; break;
			case 'DMS_AGREEMENT_SPARE_PART': titleValue = 'DMS Agreement Sparepart Approval'; break;
			case 'DMS_PRINT_GATE_PASS': titleValue = 'DMS Print Gate Pass Approval'; break;
			case 'DMS_TRANSFER_REQUEST': titleValue = 'DMS Transfer Request Approval'; break;
			case 'DMS_OUTSTANDING_PAYMENT': titleValue = 'DMS Outstanding Payment Approval'; break;

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

		return titleValue;
	}),
});