Expanded Recovery Meeting sort options and refined development SOP.

Implemented 'Meeting Name (A-Z)' and 'Meeting Name (Z-A)' sorting for Recovery Meetings, including UI dropdown updates and client-side re-sorting logic.

Updated documentation/GUIDE__DEVELOPMENT.md to v1.1 with clarified verification steps and inter-agent coordination protocols.

Minor label cleanup in Journal editor.
This commit is contained in:
Scott Idem
2026-02-16 15:58:17 -05:00
parent f34e24aa02
commit 4711f41c34
5 changed files with 33 additions and 20 deletions

View File

@@ -144,10 +144,11 @@
.toArray();
// Sort local results matching UI selection (Refactored 2026-02-16)
if ($idaa_loc.recovery_meetings.qry__order_by === 'name') {
local_results.sort((a, b) =>
(a.name ?? '').localeCompare(b.name ?? '')
);
const sort_mode = $idaa_loc.recovery_meetings.qry__order_by;
if (sort_mode === 'name_asc' || sort_mode === 'name') {
local_results.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? ''));
} else if (sort_mode === 'name_desc') {
local_results.sort((a, b) => (b.name ?? '').localeCompare(a.name ?? ''));
} else {
// Robust Chronological Sort using pre-computed tmp_sort_1
// Handles Priority, Manual Sort, and the updated_on/created_on fallback

View File

@@ -83,8 +83,10 @@
.limit(limit > 0 ? limit : 500)
.toArray();
if (order_by === 'name') {
if (order_by === 'name_asc' || order_by === 'name') {
results.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? ''));
} else if (order_by === 'name_desc') {
results.sort((a, b) => (b.name ?? '').localeCompare(a.name ?? ''));
} else {
// Robust Chronological Sort using pre-computed tmp_sort_1 (Refactored 2026-02-16)
// This handles Group > Priority > Manual Sort > Date (with updated_on fallback)

View File

@@ -356,26 +356,33 @@
id="qry_order_by__events"
bind:value={$idaa_loc.recovery_meetings.qry__order_by}
onchange={() => {
if (
$idaa_loc.recovery_meetings.qry__order_by ==
'updated_on'
) {
const mode = $idaa_loc.recovery_meetings.qry__order_by;
if (mode === 'updated_on') {
$idaa_loc.recovery_meetings.qry__order_by_li = {
priority: 'DESC',
sort: 'DESC',
updated_on: 'DESC',
created_on: 'DESC',
name: 'ASC'
}; // For the SQL query
} else {
};
} else if (mode === 'name_asc') {
$idaa_loc.recovery_meetings.qry__order_by_li = {
priority: 'DESC',
sort: 'DESC',
name: 'ASC',
updated_on: 'DESC',
created_on: 'DESC'
}; // For the SQL query
};
} else if (mode === 'name_desc') {
$idaa_loc.recovery_meetings.qry__order_by_li = {
priority: 'DESC',
sort: 'DESC',
name: 'DESC',
updated_on: 'DESC',
created_on: 'DESC'
};
}
handle_search_trigger();
}}
class="
select w-40 text-sm inline-block
@@ -386,7 +393,8 @@
"
>
<option value="updated_on">Last Updated</option>
<option value="name">Meeting Name</option>
<option value="name_asc">Meeting Name (A-Z)</option>
<option value="name_desc">Meeting Name (Z-A)</option>
</select>
</label>
</span>

View File

@@ -316,7 +316,7 @@
</label>
<label class="label">
<span class="text-sm font-bold opacity-70"
>Sort Group</span
>Journal Group (text)</span
>
<input
type="text"