Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PWA): remove approval status field from expense claim form view #1872

Closed
wants to merge 1 commit into from

Conversation

fadilsiddique
Copy link

Before:

Employees can select approval status as draft, approved or rejected and save the form.

WhatsApp Image 2024-06-08 at 4 28 42 PM (1)

After:

Moved the approval status to excluded fields.

function getFilteredFields(fields) {
	// reduce noise from the form view by excluding unnecessary fields
	// eg: employee and other details can be fetched from the session user
	const excludeFields = [
		"naming_series",
		"task",
		"taxes_and_charges_sb",
		"advance_payments_sb",
		"approval_status"
	]
	const extraFields = [
		"employee",
		"employee_name",
		"department",
		"company",
		"remark",
		"is_paid",
		"mode_of_payment",
		"clearance_date",
	]

	if (!props.id) excludeFields.push(...extraFields)

	return fields.filter((field) => !excludeFields.includes(field.fieldname))
}

WhatsApp Image 2024-06-10 at 3 50 16 PM

@ruchamahabal
Copy link
Member

Closing in favor of #1887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants