Subversion Repositories SmartDukaan

Rev

Rev 35962 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35962 Rev 35982
Line 12... Line 12...
12
} );
12
} );
13
 
13
 
14
function closeStore(fofoId, storeCode) {
14
function closeStore(fofoId, storeCode) {
15
    var inputCode = prompt("This will PERMANENTLY close the store. This action cannot be undone.\n\nTo confirm, type the store code: " + storeCode);
15
    var inputCode = prompt("This will PERMANENTLY close the store. This action cannot be undone.\n\nTo confirm, type the store code: " + storeCode);
16
    if (inputCode === null) return;
16
    if (inputCode === null) return;
-
 
17
    if (inputCode.trim() === "") {
-
 
18
        alert("Store code is required to confirm closure.");
-
 
19
        return;
-
 
20
    }
17
    if (inputCode !== storeCode) {
21
    if (inputCode.trim() !== storeCode) {
18
        alert("Store code does not match. Closure cancelled.");
22
        alert("Store code does not match. Closure cancelled.");
19
        return;
23
        return;
20
    }
24
    }
21
    $.ajax({
25
    $.ajax({
22
        url: contextPath + '/closeStore',
26
        url: contextPath + '/closeStore',