-
Notifications
You must be signed in to change notification settings - Fork 795
Open
Description
Currently, in the CRM Call doctype, the Duration field is implemented as a Text field in the frontend. However, this field stores the call duration in seconds, which should be a numeric value to allow proper validation and calculations.
Proposed Solution:
Update the frontend component to render the Duration field as a number input:
File: frontend/src/components/FieldLayout/Field.vue
Add the following code after the Int field check:
<FormControl v-else-if="field.fieldtype === 'Duration'"
:name="field.fieldname + '_field'"
:id="field.fieldname + '_field'"
type="number"
:placeholder="getPlaceholder(field)"
:disabled="Boolean(field.read_only)"
v-model="data[field.fieldname]" />
This change ensures that the Duration field accepts only numeric input, matching its purpose of storing call duration in seconds.
Impact:
- Prevents invalid text input in the Duration field.
- Enables correct calculation and storage of call duration in seconds.
Metadata
Metadata
Assignees
Labels
No labels
