Subversion Repositories SmartDukaan

Rev

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

Rev 32457 Rev 35962
Line 6... Line 6...
6
    "bLengthChange": true,
6
    "bLengthChange": true,
7
    "bFilter": true,
7
    "bFilter": true,
8
    "bInfo": false,
8
    "bInfo": false,
9
    "bAutoWidth": false }
9
    "bAutoWidth": false }
10
  );
10
  );
11
   
11
 
12
} );
12
} );
-
 
13
 
-
 
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);
-
 
16
    if (inputCode === null) return;
-
 
17
    if (inputCode !== storeCode) {
-
 
18
        alert("Store code does not match. Closure cancelled.");
-
 
19
        return;
-
 
20
    }
-
 
21
    $.ajax({
-
 
22
        url: contextPath + '/closeStore',
-
 
23
        type: 'POST',
-
 
24
        data: { fofoId: fofoId, storeCode: inputCode },
-
 
25
        success: function(response) {
-
 
26
            alert("Store closed permanently.");
-
 
27
            location.reload();
-
 
28
        },
-
 
29
        error: function(xhr) {
-
 
30
            alert("Error closing store: " + (xhr.responseText || "Unknown error"));
-
 
31
        }
-
 
32
    });
-
 
33
}
13
</script>
34
</script>
14
<section class="wrapper">            
35
<section class="wrapper">
15
	<div class="row">
36
	<div class="row">
16
		<div class="col-lg-12">
37
		<div class="col-lg-12">
17
			<h3 class="page-header"><i class="icon_document_alt"></i>INACTIVE STORE</h3>
38
			<h3 class="page-header"><i class="icon_document_alt"></i>INACTIVE STORE</h3>
18
			<ol class="breadcrumb">
39
			<ol class="breadcrumb">
19
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
40
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
20
				<li><i class="icon_document_alt"></i>INACTIVE-STORE</li>						  	
41
				<li><i class="icon_document_alt"></i>INACTIVE-STORE</li>
21
			</ol>
42
			</ol>
22
		</div>
43
		</div>
23
	</div>
44
	</div>
24
  	<div id="inactive-store-table">
45
  	<div id="inactive-store-table">
25
		<div class="row">
46
		<div class="row">
26
	    	<div class="col-lg-12">
47
	    	<div class="col-lg-12">
27
	    	
48
 
28
	    		<table class="table table-bordered" id="inactiveStore">	
49
	    		<table class="table table-bordered" id="inactiveStore">
29
	    		<thead>
50
	    		<thead>
30
	    					<th>PartnerId</th>
51
	    					<th>PartnerId</th>
31
	    					<th>Store Name</th>
52
	    					<th>Store Name</th>
32
	    					<th>Email</th>
53
	    					<th>Email</th>
33
	    					<th>Store Code</th>
54
	    					<th>Store Code</th>
-
 
55
	    					<th>Status</th>
34
	    					<th>Days For Activation</th>
56
	    					<th>Days For Activation</th>
35
	    					
57
 
36
	    					<th>Action</th>
58
	    					<th>Action</th>
37
	    				</tr>
59
	    				</tr>
38
	    				</thead>
60
	    				</thead>
39
	    				<tbody>
61
	    				<tbody>
40
	    				#if(!$fofoStores.isEmpty())
62
	    				#if(!$fofoStores.isEmpty())
41
			    			#foreach( $inactivefofoStore in $inActiveFofoStores)
63
		    			#foreach( $inactivefofoStore in $inActiveFofoStores)
42
			    				<tr>
-
 
43
			    					<td>$inactivefofoStore.getId()</td>
-
 
44
			    					#if($customRetailers.get($inactivefofoStore.getId()).getBusinessName())
-
 
45
			    					<td>$customRetailers.get($inactivefofoStore.getId()).getBusinessName()</td>
-
 
46
			    					 #else
-
 
47
                                     <td>-</td> #end
-
 
48
                                     #if($customRetailers.get($inactivefofoStore.getId()).getEmail())
-
 
49
			    					<td>$customRetailers.get($inactivefofoStore.getId()).getEmail()</td>
-
 
50
			    					#else
-
 
51
                                    <td>-</td> #end
-
 
52
			    					<td>$inactivefofoStore.getCode()</td>
-
 
53
			    					<td><input type="text" name="temporaryActivationStore" id="temporary-activation" value="" style=" width: 137px;">
-
 
54
			    					<button class="btn btn-primary activate-store-temporary"  data-fofoid="$inactivefofoStore.getId()">Temp Activate</button></td>
-
 
55
			    					<td><button class="btn btn-primary activate-store-forever"  data-fofoid="$inactivefofoStore.getId()">Activate</button></td>
-
 
56
			    					
-
 
57
			    				</tr>
-
 
58
			    			#end
-
 
59
		    			#else
-
 
60
		    				<tr>
64
		    				<tr>
-
 
65
		    					<td>$inactivefofoStore.getId()</td>
-
 
66
		    					#if($customRetailers.get($inactivefofoStore.getId()).getBusinessName())
-
 
67
		    					<td>$customRetailers.get($inactivefofoStore.getId()).getBusinessName()</td>
-
 
68
		    					 #else
-
 
69
                                 <td>-</td> #end
-
 
70
                                 #if($customRetailers.get($inactivefofoStore.getId()).getEmail())
-
 
71
		    					<td>$customRetailers.get($inactivefofoStore.getId()).getEmail()</td>
-
 
72
		    					#else
-
 
73
                                <td>-</td> #end
-
 
74
		    					<td>$inactivefofoStore.getCode()</td>
-
 
75
		    					#if($inactivefofoStore.isClosed())
-
 
76
		    					<td><span class="label label-danger">CLOSED</span></td>
-
 
77
		    					<td>-</td>
61
		    					<td colspan="6" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
78
		    					<td><span class="text-muted">Permanently Closed</span></td>
-
 
79
		    					#else
-
 
80
		    					<td><span class="label label-warning">INACTIVE</span></td>
-
 
81
		    					<td><input type="text" name="temporaryActivationStore" id="temporary-activation" value="" style=" width: 137px;">
-
 
82
		    					<button class="btn btn-primary activate-store-temporary"  data-fofoid="$inactivefofoStore.getId()">Temp Activate</button></td>
-
 
83
		    					<td>
-
 
84
		    					    <button class="btn btn-primary activate-store-forever"  data-fofoid="$inactivefofoStore.getId()">Activate</button>
-
 
85
		    					    <button class="btn btn-danger" onclick="closeStore($inactivefofoStore.getId(), '$inactivefofoStore.getCode()')">Close Store</button>
-
 
86
		    					</td>
-
 
87
		    					#end
62
		    				</tr>
88
		    				</tr>
63
		    			#end
89
		    			#end
-
 
90
	    			#else
-
 
91
	    				<tr>
-
 
92
	    					<td colspan="7" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
-
 
93
	    				</tr>
-
 
94
	    			#end
64
	    			</tbody>
95
	    			</tbody>
65
	    		</table>
96
	    		</table>
66
	    	</div>
97
	    	</div>
67
	    </div>
98
	    </div>
68
    </div>
99
    </div>
69
</section>
-
 
70
100
</section>
-
 
101