Promact/slack-erp-custom-integration-mvc

View on GitHub
Slack.Automation/Promact.Erp.Web/app/Group/GroupList/groupList.html

Summary

Maintainability
Test Coverage
<div class="group-list">
    <div class="page-title">
        <div class="title_left">
            <h3>Group</h3>
        </div>
        <div class="title_right">
            <div class="form-group pull-right ">
                <button class="btn btn-success custom-btn" (click)="addNewGroup()"><i class="fa fa-plus"></i>Add New Group</button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_content">
                        <div class="clearfix"></div>
                        <div>
                            <table class="table table-bordered" [md2Data]="groupList" #md2="md2DataTable" [rowsPerPage]="10">
                                <thead>
                                    <tr>
                                        <th>Name</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr *ngFor="let group of md2.data">
                                        <td>{{group.Name}}</td>
                                        <td>
                                            <button class="btn btn-success edit-btn" (click)="editGroup(group.Id)" [disabled]="!(group.Type == 2)"><i class="fa fa-edit"></i> Edit</button>
                                            <button class="btn btn-success" (click)="delteGroupPopup(group.Id,confirm)" [disabled]="!(group.Type == 2)"><i class="fa fa-trash"></i> Delete</button>
                                        </td>
                                    </tr>
                                </tbody>
                                <tfoot>
                                    <tr>
                                        <td colspan="9">
                                            <md2-pagination [rowsPerPageSet]="[5,10,15]"></md2-pagination>
                                        </td>
                                    </tr>
                                </tfoot>
                            </table>
                        </div>
                        <md2-dialog #confirm>
                            <md2-dialog-title>Delete Confirmation</md2-dialog-title>
                            <p>Are you sure you want to delete?</p>
                            <md2-dialog-footer>
                                <button class="btn btn-success" (click)="deleteGroup(confirm)">Confirm</button>
                                <button class="btn btn-default" button (click)="closeDeletePopup(confirm)">Cancel</button>
                            </md2-dialog-footer>
                        </md2-dialog>
                    </div>
              </div>
            </div>
        </div>
</div>