Subversion Repositories SmartDukaan

Rev

Rev 34405 | Rev 34546 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34405 Rev 34445
Line -... Line 1...
-
 
1
$(document).on('change', '.catalogId', function () {
-
 
2
    let qty = $(this).find('option:selected').data('qty');
-
 
3
    $('#quantity').val(qty);
-
 
4
});
1
 
5
 
2
function initializeSelect(selector, type='catalogs') {
6
function initializeSelect(selector, type='catalogs') {
3
    if (type === 'catalogs') {
7
    if (type === 'catalogs') {
4
        $(selector).multiselect('destroy');
8
        $(selector).multiselect('destroy');
5
        $(selector).multiselect({
9
        $(selector).multiselect({
Line 64... Line 68...
64
        if (response.statusCode == 200){
68
        if (response.statusCode == 200){
65
            $('#manageLiquidationModal').modal('show');
69
            $('#manageLiquidationModal').modal('show');
66
            let names = Object.keys(response.response);
70
            let names = Object.keys(response.response);
67
            if (names.length){
71
            if (names.length){
68
                names.forEach(name => {
72
                names.forEach(name => {
69
                    if (name == 'catalogId' || name == 'status') {
73
                    if(name === 'restricted') $(`#${name}`).prop('checked', response.response['restricted']);
70
                        $(`#${name}`).val(response.response[name]);
74
                    $(`#${name}`).val(response.response[name]);
71
                        $(`#${name}`).multiselect('refresh');
75
                    if (name === 'catalogId' || name === 'status') $(`#${name}`).multiselect('refresh');
72
                    } else {
-
 
73
                        if(name == 'restricted') $(`#restricted`).prop('checked', response.response['restricted']);
-
 
74
                        $(`#${name}`).val(response.response[name]);
-
 
75
                    }
-
 
76
                })
76
                })
77
            }
77
            }
78
        }
78
        }
79
    });
79
    });
80
}
80
}
Line 93... Line 93...
93
            });
93
            });
94
        } else {
94
        } else {
95
            alert("Liquidation not found");
95
            alert("Liquidation not found");
96
        }
96
        }
97
    }
97
    }
98
}
-
 
99
98
}
-
 
99