Skip to content

Commit 3e828b2

Browse files
committed
Javascript updated
1 parent 6651bae commit 3e828b2

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

sde_indexing_helper/static/js/delta_url_list.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,7 @@ function handleWorkflowStatusSelect() {
21992199

22002200
function handleReindexingStatusSelect() {
22012201
$("body").on("click", ".reindexing_status_select", function () {
2202+
console.log("Reindexing status select clicked");
22022203
$("#reindexingStatusChangeModal").modal();
22032204
var collectionName = $(".urlStyle").text();
22042205
var collection_id = $(this).data("collection-id");
@@ -2219,21 +2220,23 @@ function handleReindexingStatusSelect() {
22192220
case "changeReindexingStatus":
22202221
var color_choices = {
22212222
1: "btn-light", // REINDEXING_NOT_NEEDED
2222-
2: "btn-warning", // REINDEXING_NEEDED_ON_DEV
2223-
3: "btn-secondary", // REINDEXING_FINISHED_ON_DEV
2224-
4: "btn-info", // REINDEXING_READY_FOR_CURATION
2225-
5: "btn-warning", // REINDEXING_CURATION_IN_PROGRESS
2226-
6: "btn-primary", // REINDEXING_CURATED
2227-
7: "btn-success" // REINDEXING_INDEXED_ON_PROD
2228-
};
2223+
2: "btn-danger", // REINDEXING_NEEDED_ON_DEV (matching Ready For Engineering)
2224+
3: "btn-info", // REINDEXING_FINISHED_ON_DEV (matching Indexing Finished on LRM Dev)
2225+
4: "btn-info", // REINDEXING_READY_FOR_CURATION (matching Ready for Curation)
2226+
5: "btn-success", // REINDEXING_CURATION_IN_PROGRESS (matching Curation in Progress)
2227+
6: "btn-primary", // REINDEXING_CURATED (matching Curated)
2228+
7: "btn-primary" // REINDEXING_INDEXED_ON_PROD (matching Prod: Perfect)
2229+
};
22292230

22302231
$button = $(`#reindexing-status-button-${collection_id}`);
22312232

22322233
$button.text(new_reindexing_status);
22332234
$button.removeClass(
22342235
"btn-light btn-danger btn-warning btn-info btn-success btn-primary btn-secondary"
22352236
);
2237+
console.log("After remove class:", $button.attr('class'));
22362238
$button.addClass(color_choices[parseInt(reindexing_status)]);
2239+
console.log("After add class:", $button.attr('class'));
22372240
postReindexingStatus(collection_id, reindexing_status);
22382241
$("#reindexingStatusChangeModal").modal("hide");
22392242
break;

0 commit comments

Comments
 (0)