Subversion Repositories SmartDukaan

Rev

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

Rev 34198 Rev 34295
Line 14... Line 14...
14
                <li class="active"><a data-toggle="tab" href="#pending">Pending</a></li>
14
                <li class="active"><a data-toggle="tab" href="#pending">Pending</a></li>
15
                <li><a data-toggle="tab" href="#approved">Approved</a></li>
15
                <li><a data-toggle="tab" href="#approved">Approved</a></li>
16
            </ul>
16
            </ul>
17
            <div class="tab-content">
17
            <div class="tab-content">
18
                <div id="pending" class="tab-pane fade in active">
18
                <div id="pending" class="tab-pane fade in active">
19
                    <table class="table table-bordered table-condensed" id="pendingRequestedAllocationList"
19
                    <table class="table table-bordered table-condensed pendingRequestedAllocationList"
20
                           style="width:100%">
20
                           style="width:100%">
21
                        <thead class="row htable" style="background:#F5F5F5;">
21
                        <thead class="row htable" style="background:#F5F5F5;">
22
                        <tr style="color:black;">
22
                        <tr style="color:black;">
23
                            <th>Fofo Id</th>
23
                            <th>Fofo Id</th>
24
                            <th>Partner Name</th>
24
                            <th>Partner Name</th>
Line 35... Line 35...
35
                                <td> $model.getFofoId() </td>
35
                                <td> $model.getFofoId() </td>
36
                                <td> $userMap.get($model.getFofoId()).getName() </td>
36
                                <td> $userMap.get($model.getFofoId()).getName() </td>
37
                                <td> $model.getCatalogId() </td>
37
                                <td> $model.getCatalogId() </td>
38
                                <td> $model.getModelNumber() </td>
38
                                <td> $model.getModelNumber() </td>
39
                                <td> $model.getBrand() </td>
39
                                <td> $model.getBrand() </td>
40
                                <td> $model.getRequested_allocation() </td>
40
                                <td><input type="text" value="$model.getRequested_allocation()"
-
 
41
                                           class="reuested_allocation" disabled> <a role="button"> <i
-
 
42
                                        class="fa fa-edit edit-allocation"></i></a></td>
41
                                <td>
43
                                <td>
42
                                    <button class="btn btn-sm btn-success allocation-request-approve-reject"
44
                                    <button class="btn btn-sm btn-success allocation-request-approve-reject"
43
                                            data-id="$model.getId()" data-status="true">Approve
45
                                            data-id="$model.getId()" data-status="true">Approve
44
                                    </button>
46
                                    </button>
45
                                    /
47
                                    /
46
                                    <button class="btn btn-sm btn-danger allocation-request-approve-reject"
48
                                    <button class="btn btn-sm btn-danger allocation-request-approve-reject"
47
                                            data-id="$model.getId()" data-status="false">Reject
49
                                            data-id="$model.getId()" data-status="false">Reject
48
                                    </button>
50
                                    </button>
-
 
51
                                    /
-
 
52
                                    <button class="btn btn-sm btn-info allocation-request-edit"
-
 
53
                                            data-id="$model.getId()">Edit
-
 
54
                                    </button>
49
                                </td>
55
                                </td>
50
                            </tr>
56
                            </tr>
51
                            #end
57
                            #end
52
                        </tbody>
58
                        </tbody>
53
                    </table>
59
                    </table>
54
                </div>
60
                </div>
55
                <div id="approved" class="tab-pane fade">
61
                <div id="approved" class="tab-pane fade">
56
                    <table class="table table-bordered table-condensed" id="approvedRequestedAllocationList"
62
                    <table class="table table-bordered table-condensed approvedRequestedAllocationList"
57
                           style="width:100%">
63
                           style="width:100%">
58
                        <thead class="row htable" style="background:#F5F5F5;">
64
                        <thead class="row htable" style="background:#F5F5F5;">
59
                        <tr style="color:black;">
65
                        <tr style="color:black;">
60
                            <th>Fofo Id</th>
66
                            <th>Fofo Id</th>
61
                            <th>Partner Name</th>
67
                            <th>Partner Name</th>
Line 72... Line 78...
72
                                <td> $model.getFofoId() </td>
78
                                <td> $model.getFofoId() </td>
73
                                <td> $userMap.get($model.getFofoId()).getName() </td>
79
                                <td> $userMap.get($model.getFofoId()).getName() </td>
74
                                <td> $model.getCatalogId() </td>
80
                                <td> $model.getCatalogId() </td>
75
                                <td> $model.getModelNumber() </td>
81
                                <td> $model.getModelNumber() </td>
76
                                <td> $model.getBrand() </td>
82
                                <td> $model.getBrand() </td>
77
                                <td> $model.getRequested_allocation() </td>
83
                                <td><input type="text" value="$model.getRequested_allocation()"
-
 
84
                                           class="reuested_allocation" disabled> <a role="button"> <i
-
 
85
                                        class="fa fa-edit edit-allocation"></i></a></td>
78
                                <td>
86
                                <td>
79
                                    <button class="btn btn-sm btn-danger allocation-request-approve-reject"
87
                                    <button class="btn btn-sm btn-danger allocation-request-approve-reject"
80
                                            data-id="$model.getId()" data-status="false">Reject
88
                                            data-id="$model.getId()" data-status="false">Reject
81
                                    </button>
89
                                    </button>
-
 
90
                                    <button class="btn btn-sm btn-info allocation-request-edit"
-
 
91
                                            data-id="$model.getId()">Edit
-
 
92
                                    </button>
82
                                </td>
93
                                </td>
83
                            </tr>
94
                            </tr>
84
                            #end
95
                            #end
85
                        </tbody>
96
                        </tbody>
86
                    </table>
97
                    </table>
Line 95... Line 106...
95
 
106
 
96
<script>
107
<script>
97
 
108
 
98
    $(document).ready(function () {
109
    $(document).ready(function () {
99
        // Initialize first table
110
        // Initialize first table
100
        var sanctionTable = $('#pendingRequestedAllocationList').DataTable({
111
        var sanctionTable = $('.pendingRequestedAllocationList').DataTable({
101
            "scrollX": true,
112
            "scrollX": true,
102
            scrollCollapse: true,
113
            scrollCollapse: true,
103
            "fixedHeader": true,
114
            "fixedHeader": true,
104
            "order": [[0, "desc"]],
115
            "order": [[0, "desc"]],
105
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
116
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
106
        });
117
        });
107
 
118
 
108
        // Initialize second table
119
        // Initialize second table
109
        var sanctionTableApproved = $('#approvedRequestedAllocationList').DataTable({
120
        var sanctionTableApproved = $('.approvedRequestedAllocationList').DataTable({
110
            "scrollX": true,
121
            "scrollX": true,
111
            scrollCollapse: true,
122
            scrollCollapse: true,
112
            "fixedHeader": true,
123
            "fixedHeader": true,
113
            "order": [[0, "desc"]],
124
            "order": [[0, "desc"]],
114
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
125
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup