refactor: improve code formatting and readability in group duty pin command and tests
- Enhanced the `pin_duty_cmd` function by improving code formatting for better readability, ensuring consistent style across the codebase. - Updated unit tests for `pin_duty_cmd` to follow the same formatting improvements, enhancing clarity and maintainability. - No functional changes were made; the focus was solely on code style and organization.
This commit is contained in:
@@ -126,9 +126,14 @@ function buildDutyItemTimePrefix(item, idx, total, hintDay, sep, fromLabel, toLa
|
||||
timePrefix = toLabel + sep + endHHMM;
|
||||
}
|
||||
} else if (idx > 0) {
|
||||
if (startHHMM) timePrefix = fromLabel + sep + startHHMM;
|
||||
if (endHHMM && endSameDay && endHHMM !== startHHMM) {
|
||||
timePrefix += (timePrefix ? " " : "") + toLabel + sep + endHHMM;
|
||||
if (startSameDay && startHHMM) {
|
||||
timePrefix = fromLabel + sep + startHHMM;
|
||||
if (endHHMM && endSameDay && endHHMM !== startHHMM) {
|
||||
timePrefix += " " + toLabel + sep + endHHMM;
|
||||
}
|
||||
} else if (endHHMM) {
|
||||
/* Continuation from previous day — only end time */
|
||||
timePrefix = toLabel + sep + endHHMM;
|
||||
}
|
||||
}
|
||||
return timePrefix;
|
||||
|
||||
Reference in New Issue
Block a user