feat: Add support for minutes in auto resolve feature (#11269)

### Summary

- Converts conversation auto-resolution duration from days to minutes
for more
granular control
- Updates validation to allow values from 10 minutes (minimum) to 999
days (maximum)
- Implements smart messaging to show appropriate time units in activity
messages

###  Changes

- Created migration to convert existing durations from days to minutes
(x1440)
- Updated conversation resolver to use minutes instead of days
- Added dynamic translation key selection based on duration value
- Updated related specs and documentation
- Added support for displaying durations in days, hours, or minutes
based on value

###  Test plan

- Verify account validation accepts new minute-based ranges
- Confirm existing account settings are correctly migrated
- Test auto-resolution works properly with minute values
- Ensure proper time unit display in activity messages

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Shivam Mishra
2025-05-07 13:06:15 +05:30
committed by GitHub
parent e08436dde5
commit b533980880
34 changed files with 864 additions and 367 deletions

View File

@@ -1,28 +1,12 @@
<script>
export default {
props: {
label: {
type: String,
default: '',
},
name: {
type: String,
required: true,
},
icon: {
type: String,
default: '',
},
hasError: {
type: Boolean,
default: false,
},
errorMessage: {
type: String,
default: '',
},
},
};
<script setup>
defineProps({
label: { type: String, default: '' },
name: { type: String, required: true },
icon: { type: String, default: '' },
hasError: { type: Boolean, default: false },
helpMessage: { type: String, default: '' },
errorMessage: { type: String, default: '' },
});
</script>
<template>
@@ -30,8 +14,8 @@ export default {
<label
v-if="label"
:for="name"
class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white"
:class="{ 'text-red-500': hasError }"
class="flex justify-between text-sm font-medium leading-6 text-n-slate-12"
:class="{ 'text-n-ruby-12': hasError }"
>
<slot name="label">
{{ label }}
@@ -44,16 +28,24 @@ export default {
v-if="icon"
size="16"
:icon="icon"
class="absolute left-2 transform text-slate-400 dark:text-slate-600 w-5 h-5"
class="absolute left-2 transform text-n-slate-9 w-5 h-5"
/>
<slot />
</div>
<span
<div
v-if="errorMessage && hasError"
class="text-xs text-n-ruby-9 dark:text-n-ruby-9 leading-2"
class="text-xs mt-2 ml-px text-n-ruby-9 leading-tight"
>
{{ errorMessage }}
</span>
</div>
<div
v-else-if="helpMessage || $slots.help"
class="text-xs mt-2 ml-px text-n-slate-10 leading-tight"
>
<slot name="help">
{{ helpMessage }}
</slot>
</div>
</div>
</div>
</template>