[FIX] reconciliation buttons cycle
This commit is contained in:
parent
a0601d909f
commit
23bb0e783c
@ -47,16 +47,22 @@
|
|||||||
|
|
||||||
function update_btn() {
|
function update_btn() {
|
||||||
var $reconcile = $('<button class="btn btn-success" type="button">')
|
var $reconcile = $('<button class="btn btn-success" type="button">')
|
||||||
.text("Reconcile")
|
.text("Next Reconcile")
|
||||||
.appendTo($buttons.empty())
|
.appendTo($buttons.empty())
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 0: case 1: break;
|
case 0:
|
||||||
|
$reconcile.text("Reconcile");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$reconcile.prop('disabled', true);
|
$reconcile.prop('disabled', true);
|
||||||
$('<button class="btn btn-primary" type="button">')
|
$('<button class="btn btn-primary" type="button">')
|
||||||
.text("Unreconcile")
|
.text("Unreconcile")
|
||||||
.appendTo($buttons);
|
.appendTo($buttons);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error("Unknown button state " + state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user