src/ApplicationBundle/Modules/System/Resources/views/pages/systemChangeLog.html.twig line 1

Open in your IDE?
  1. {# Ported to the cp shell (UI unification Phase 1). SKIN ONLY: no access-control,
  2.    approval, signature/hash or doc-log logic is touched. #}
  3. {% extends '@System/layouts/system_layout.html.twig' %}
  4. {% set active = 'change_log' %}
  5. {% set page_title = 'Change Log' %}
  6. {% block body %}
  7. <div id="base" xmlns="http://www.w3.org/1999/html">
  8.     <div id="content">
  9.         <section>
  10.             <div class="section-body">
  11.                 <div class="row">
  12.                     <div class="col-xs-12">
  13.                         <div class="card card-bordered style-primary">
  14.                             <div class="header bg-deep-purple">
  15.                                 <header>
  16.                                     HoneyBee Ecosystem Change Log
  17.                                 </header>
  18.                                 <div class="tools">
  19.                                     <a class="btn btn-icon-toggle btn-collapse"><i class="fa fa-angle-down"></i></a>
  20.                                     <a class="btn btn-icon-toggle btn-close"><i class="zmdi zmdi-close"></i></a>
  21.                                 </div>
  22.                             </div>
  23.                             {#{{ contentData|json_encode()|raw }}#}
  24.                             {#{{ dump(path) }}#}
  25.                             {#{{ dump(content) }}#}
  26.                             {#{{ dump(contentData) }}#}
  27.                             <div class="body  style-default-bright">
  28.                                 {% for row in contentData %}
  29.                                     <h3 style="text-transform: uppercase; font-size: 24px;{{ row.severity=='major'?'color:darkred;':'' }}">Ver. {{ row.versionNumber }} ------ ({{ row.releaseDate }}) </h3>
  30.                                     {% if row.changeLog.feature is defined %}
  31.                                         <h3>Features:</h3>
  32.                                         <ul>
  33.                                     {% for logData in row.changeLog.feature %}
  34.                                         <li style="font-size: 15px;">{{ logData }} </li>
  35.                                     {% endfor %}
  36.                                         </ul>
  37.                                     {% endif %}
  38.                                     {% if row.changeLog.modification is defined %}
  39.                                         <h3>Modifications:</h3>
  40.                                         <ul>
  41.                                             {% for logData in row.changeLog.modification %}
  42.                                                 <li style="font-size: 15px;">{{ logData }} </li>
  43.                                             {% endfor %}
  44.                                         </ul>
  45.                                     {% endif %}
  46.                                     {% if row.changeLog.bugfix is defined %}
  47.                                         <h3>Bug Fixes:</h3>
  48.                                         <ul>
  49.                                             {% for logData in row.changeLog.bugfix %}
  50.                                                 <li style="font-size: 15px;">{{ logData }} </li>
  51.                                             {% endfor %}
  52.                                         </ul>
  53.                                     {% endif %}
  54.                                 {% endfor %}
  55.                             </div>
  56.                         </div>
  57.                     </div>
  58.                 </div>
  59.             </div>
  60.         </section>
  61.     </div>
  62. </div>
  63. {% include '@Application/footer/footer_copyright.html.twig' %}
  64. <div class="control-sidebar-bg"></div>
  65. {% include '@Application/footer/footer_js_codecovers.html.twig' %}
  66. {% include '@Application/codecovers_footer.html.twig' %}
  67. <script>
  68.     jQuery(document).ready(function () {
  69.         var t_title = "SALES ORDER LIST (AS ON {{ ''|date('F d, Y') }})"
  70. //        $('#product_list_table').DataTable();
  71.         var draftStatusData={
  72.             '': '',
  73.             '0': 'No',
  74.             '1': 'Yes',
  75.         };
  76.         var stageStatusData={
  77.             0: 'Pending',
  78.             '': '',
  79.             1: 'Pending',
  80.             2: 'Complete',
  81.             4: 'Partial',
  82.         };
  83.         var approvalStatusData={
  84.             0: 'Pending',
  85.             '': '',
  86.             1: 'Pending',
  87.             2: 'Complete',
  88.             4: 'Partial',
  89.         };
  90.         var tableConfig = {
  91.             'config': {
  92.                 'mainTableAlias': "mainTable",
  93.                 'mainTableClass': "ApplicationBundle:SalesOrder",
  94.                 'mainTableIdField': "salesOrderId",
  95.                 'otherConditions': " (mainTable.CompanyId=1 and mainTable.status=1) ",
  96.                 'dateFieldsToStr': ['salesOrderDate'],
  97.                 'skipColumnNames': ['edit_button', 'view_button','row_select'],
  98.                 'flagColNames': ['draftFlag', 'stage', 'approved'],
  99.                 'flagConversionByCols': {
  100.                     'draftFlag': [draftStatusData],
  101.                     'stage': [stageStatusData],
  102.                     'approved': [approvalStatusData],
  103.                 },
  104.                 'joinTableList': [
  105.                     {
  106.                         'tableClass': "ApplicationBundle\\Entity\\AccClients",
  107.                         'tableAlias': "clientTable",
  108.                         'onField': 'clientId',
  109.                         "onMainTableField": "clientId",
  110.                         "fields": {
  111.                             //'alisaFiled':'actiual field Name'
  112.                             'clientName': 'clientName',
  113.                             'clientDue': 'clientDue',
  114.                             'clientContactNumber': 'contactNumber',
  115.                             'clientCode': 'clientNumericalCode',
  116.                         }
  117.                     },
  118.                     {
  119.                         'tableClass': "ApplicationBundle\\Entity\\Employee",
  120.                         'tableAlias': "salesPersonTable",
  121.                         'onField': 'employeeId',
  122.                         "onMainTableField": "salesPersonId",
  123.                         "fields": {
  124.                             //'alisaFiled':'actiual field Name'
  125.                             'salesPersonName': 'name',
  126.                         }
  127.                     },
  128.                     {
  129.                         'tableClass': "ApplicationBundle\\Entity\\Region",
  130.                         'tableAlias': "regionTable",
  131.                         'onField': 'id',
  132.                         "onMainTableField": "salesPersonTable.regionId",
  133.                         "fields": {
  134.                             //'alisaFiled':'actiual field Name'
  135.                             'regionName': 'name',
  136.                         }
  137.                     },
  138.                     {
  139.                         'tableClass': "ApplicationBundle\\Entity\\SysDepartmentPosition",
  140.                         'tableAlias': "positionTable",
  141.                         'onField': 'positionId',
  142.                         "onMainTableField": "salesPersonTable.positionId",
  143.                         "fields": {
  144.                             //'alisaFiled':'actiual field Name'
  145.                             'positionName': 'positionName',
  146.                         }
  147.                     },
  148.                 ],
  149.             },
  150.             'columns': [
  151.                 {
  152.                     ///this is the select check box dont edit this one and keep this one
  153.                     "title": "",
  154.                     "name": "row_select",
  155.                     "data": function (row) {
  156.                         return `<label class="checkbox-inline checkbox-styled checkbox-datatable-selector ">
  157.                                                     <input type="checkbox" value="1" ><span></span>
  158.                                                 </label>`
  159.                     },
  160.                     "defaultContent": ""
  161.                 },
  162.                 {
  163.                     "title": "ID",
  164.                     "name": "salesOrderId",
  165.                     "data": function (row) {
  166.                         return row.mainTable.salesOrderId.padStart(8, 0);
  167.                     },
  168.                     "tableField": "salesOrderId",
  169.                     "defaultContent": ""
  170.                 },
  171.                 {
  172.                     "title": "Date",
  173.                     "name": "salesOrderDate",
  174.                     "data": function (row) {
  175.                         return row.mainTable.salesOrderDateStr;
  176.                     },
  177.                     "defaultContent": ""
  178.                 },
  179.                 {
  180.                     "title": "Document Number",
  181.                     "name": "documentHash", //this will be used directly to get the field in search or query
  182.                     "data": function (row) {
  183.                         return '<a class="" target="_blank" href="{{ path('view_sales_order') }}/' + row.mainTable.salesOrderId + '">' +
  184.                                 (row.mainTable.documentHash) + '</a>';
  185.                     },
  186.                     "defaultContent": ""
  187.                 },
  188.                 {
  189.                     "title": "Customer",
  190.                     "name": "clientTable.clientName", //this will be used directly to get the field in search or query
  191.                     "data": function (row) {
  192.                         return '<a class="" target="_blank" href="{{ path('client_profile') }}/CI/' + row.mainTable.clientId + '">' +
  193.                                 (row.clientCode) + ' - ' + (row.clientName) + '</a>';
  194.                     },
  195.                     "defaultContent": ""
  196.                 },
  197.                 {
  198.                     "title": "Contact No.",
  199.                     "name": "clientTable.contactNumber", //this will be used directly to get the field in search or query
  200.                     "data": function (row) {
  201.                         return row.clientContactNumber;
  202.                     },
  203.                     "defaultContent": ""
  204.                 },
  205.                 {
  206.                     "title": "Sales Person",
  207.                     "name": "salesPersonTable.name", //this will be used directly to get the field in search or query
  208.                     "data": function (row) {
  209.                         return row.salesPersonName+' - ('+row.positionName+' )';
  210.                     },
  211.                     "defaultContent": ""
  212.                 },
  213.                 {
  214.                     "title": "Order Amount",
  215.                     "name": "soAmount",
  216.                     "data": function (row) {
  217.                         return (1*row.mainTable.soAmount).toFixed(2);
  218.                     },
  219.                     "defaultContent": ""
  220.                 },
  221. //                {
  222. //                    "title": "Draft",
  223. //                    "name": "draftFlag",
  224. //                    "data": function (row) {
  225. //                        return draftStatusData[row.mainTable.draftFlag];
  226. //                    },
  227. //                    "defaultContent": ""
  228. //                },
  229.                 {
  230.                     "title": "Approval Status",
  231.                     "name": "approved",
  232.                     "data": function (row) {
  233.                         return approvalStatusData[row.mainTable.approved];
  234.                     },
  235.                     "defaultContent": ""
  236.                 },
  237.                 {
  238.                     "title": "Stage",
  239.                     "name": "approved",
  240.                     "data": function (row) {
  241.                         return stageStatusData[row.mainTable.stage];
  242.                     },
  243.                     "defaultContent": ""
  244.                 },
  245.                 {
  246.                     "title": "View",
  247.                     "name": "view_button",
  248.                     "data": function (row) {
  249.                         return '<a class="btn ink-reaction btn-raised btn-primary btn-sm" target="_blank" href="{{ path('view_sales_order') }}/' + row.mainTable.salesOrderId + '">' +
  250.                                 '<i class="fa fa-share-square"></i> <span class="view_btn_txt">VIEW</span> </a>'
  251.                     },
  252.                     "defaultContent": "Click to edit"
  253.                 },
  254.                 {
  255.                     "title": "Print",
  256.                     "name": "print_button",
  257.                     "data": function (row) {
  258.                         return '<a class="btn ink-reaction btn-raised btn-primary btn-sm" target="_blank" href="{{ path('print_sales_order') }}/' + row.mainTable.salesOrderId + '">' +
  259.                                 '<i class="fa fa-print"></i> <span class="print_btn_txt">PRINT</span> </a>'
  260.                     },
  261.                     "defaultContent": "Click to edit"
  262.                 },
  263.             ],
  264.             'columnDefs': [
  265.                 {
  266.                     responsivePriority: 1,
  267.                     targets: [0,1, -1]
  268.                 },
  269.                 {
  270.                     responsivePriority: 2,
  271.                     targets: [2, 3]
  272.                 },
  273.                 {
  274.                     orderable: false,
  275. //                                    className: 'select-checkbox',
  276.                     targets: 0,
  277.                 },
  278.                 {
  279.                     className: "trans_amount",
  280.                     targets: [7]
  281.                 }, {
  282.                     className: "align_center",
  283.                     targets: [1,8]
  284.                 }
  285.             ],
  286.         };
  287.         var listtable = $('#ajax_data_table')
  288.                 .DataTable({
  289. //                            dom: 't',
  290.                     dom: 'Blfrtip',
  291. //                    responsive: true,
  292.                     lengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
  293. //                    "scrollX": true,
  294. //                    fixedColumns: {
  295. //                        leftColumns: 3,
  296. //                        rightColumns: 3,
  297. //                    },
  298.                     "buttons": {
  299.                         dom: {
  300.                             button: {
  301.                                 tag: 'button',
  302.                                 className: 'dt-gen-button btn btn-sm waves-effect bg-grey'
  303.                             }
  304.                         },
  305.                         "buttons": [
  306.                             //'copy', 'csv', 'pdf',
  307.                             {
  308.                                 "extend": 'copy',
  309.                                 "text": '<i class="fa fa-copy"></i> COPY',
  310.                                 "exportOptions": {
  311.                                     "modifier": {
  312.                                         "page": 'current'
  313.                                     }
  314.                                 },
  315.                                 "messageTop": t_title
  316.                             },
  317.                             {
  318.                                 "extend": 'print',
  319.                                 "text": '<i class="fa fa-print"></i> PRINT',
  320.                                 "exportOptions": {
  321.                                     "modifier": {
  322.                                         "page": 'current'
  323.                                     }
  324.                                 },
  325. //                                action: function ( e, dt, node, config ) {
  326. //                                    var myButton = this;
  327. //                                    dt.one( 'draw', function () {
  328. //                                        $.fn.dataTable.ext.buttons.printHtml5.action.call(myButton, e, dt, node, config);
  329. //                                    });
  330. //                                    dt.page.len(-1).draw();
  331. //                                },
  332.                                 "messageTop": t_title
  333.                             },
  334.                             {
  335.                                 "extend": 'pdf',
  336.                                 "text": '<i class="fa fa-file-pdf"></i> PDF',
  337.                                 "exportOptions": {
  338.                                     "modifier": {
  339.                                         "page": 'all'
  340.                                     }
  341.                                 },
  342.                                 action: function (e, dt, node, config) {
  343.                                     var myButton = this;
  344.                                     dt.one('draw', function () {
  345.                                         $.fn.dataTable.ext.buttons.pdfHtml5.action.call(myButton, e, dt, node, config);
  346.                                     });
  347.                                     dt.page.len(-1).draw();
  348.                                 },
  349.                                 "messageTop": t_title
  350.                             },
  351.                             {
  352.                                 "extend": 'excel',
  353.                                 "text": '<i class="fa fa-file-excel"></i> ALL',
  354.                                 "className": 'bg-blue',
  355.                                 //"className": 'btn btn-sm bg-blue',
  356.                                 "exportOptions": {
  357.                                     "modifier": {
  358.                                         "page": 'all'
  359.                                     }
  360.                                 },
  361.                                 action: function (e, dt, node, config) {
  362.                                     var myButton = this;
  363.                                     dt.one('draw', function () {
  364.                                         $.fn.dataTable.ext.buttons.excelHtml5.action.call(myButton, e, dt, node, config);
  365.                                     });
  366.                                     dt.page.len(-1).draw();
  367.                                 },
  368.                                 "messageTop": t_title
  369.                             },
  370.                             {
  371.                                 "extend": 'excel',
  372.                                 "text": '<i class="fa fa-file-excel"></i> PAGE',
  373.                                 "className": 'bg-blue',
  374.                                 //"className": 'btn btn-sm bg-blue',
  375.                                 "exportOptions": {
  376.                                     "modifier": {
  377.                                         "page": 'current'
  378.                                     }
  379.                                 },
  380.                                 "messageTop": t_title
  381.                             },
  382.                             {
  383.                                 "extend": 'excel',
  384.                                 "text": '<i class="fa fa-file-excel"></i> SELECTED',
  385.                                 "className": 'bg-blue',
  386.                                 //"className": 'btn btn-sm bg-blue',
  387.                                 "messageTop": t_title,
  388.                                 exportOptions: {
  389.                                     //columns: ':visible:not(.not-exported)',
  390.                                     modifier: {
  391.                                         selected: true
  392.                                     }
  393.                                 },
  394.                                 title: 'Data export'
  395.                             }
  396.                         ]
  397.                     },
  398.                     "select": {
  399.                         style:    'os',
  400.                         selector: 'td:first-child .checkbox-inline>input:checkbox'
  401.                     },
  402.                     "order": [[0, "asc"]],
  403.                     columnDefs: tableConfig.columnDefs,
  404.                     columns: tableConfig.columns,
  405.                     "processing": true,
  406.                     "serverSide": true,
  407.                     "ajax": {
  408.                         "url": "{{ url('generic_datatable_ajax') }}?dataTableQry=1",
  409.                         "type": 'POST',
  410.                         "data": {
  411.                             returnJson: 1,
  412.                             config: tableConfig.config
  413. //                           sessionData: sessionData,
  414. //                           getUnitListFlag:getUnitListFlag
  415.                         }
  416.                     },
  417.                     initComplete: function () {
  418.                         this.api().columns().every(function (col_ind) {
  419.                             var column = this;
  420.                             var exclude_col = [];
  421.                             if (exclude_col.indexOf(col_ind) > -1) {
  422.                             }
  423.                             else {
  424. //                                var select = $('<select class="form-conrol selectize_dt_filter"><option value="">All</option></select>')
  425.                                 var search_cont = $('<div class="form-line"></div>').appendTo($(column.header()))
  426.                                 var search_box = $('<input type="text" class="form-control ">')
  427.                                         .appendTo(search_cont)
  428.                                         .bindWithDelay('keyup change', function () {
  429.                                             var val = $.fn.dataTable.util.escapeRegex(
  430.                                                     $(this).val()
  431.                                             );
  432.                                             column
  433.                                             //                                                    .search(val ? '^' + val + '$' : '', true, false)
  434.                                                     .search(val ? val : '', true, false)
  435.                                                     .draw();
  436.                                         }, 1000);
  437.                             }
  438.                         });
  439.                     }
  440.                 });
  441.         $(".data_table_search_marker_field").bindWithDelay("keyup", function (e) {
  442.             listtable.search($(this).val()).draw()
  443.         }, 1000);
  444.         jQuery('.data_table_search_button').click(function () {
  445.             listtable.search($('.data_table_search_marker_field').val()).draw()
  446.         });
  447.         $(document).on('click','.confirmOrderButton',function(e){
  448.             e.preventDefault();
  449.             if ($(this).hasClass('already_confirmed')) return;
  450.             var soId = $(this).attr('data-id');
  451.             $.post('{{ url('confirm_client_sales_order') }}', {
  452. //                        returnJson: 1,
  453. //                        sessionData: sessionData
  454.                         soIds: soId
  455.                     })
  456.                     .done(function (data) {
  457.                         //    console.log(data);
  458.                         if (data.success == true) {
  459.                             swal({
  460.                                 title: "Sweet!",
  461.                                 text: "Order(s) Confirmed for Processing !",
  462.                                 imageUrl: BaseURL + "images/thumbs-up.png"
  463.                             });
  464.                             alertify.success("Order Confirmation Done");
  465.                             var succeeded_so_ids = data.succeeded_so_ids;
  466.                             for (var k = 0; k < succeeded_so_ids.length; k++) {
  467.                                 $('#confirmOrderButton_' + succeeded_so_ids[k]).html('<i class="material-icons">verified_user</i> <span>CONFIRMED</span>')
  468.                                 $('#confirmOrderButton_' + succeeded_so_ids[k]).addClass('already_confirmed')
  469.                                 $('#confirmOrderButton_' + succeeded_so_ids[k]).removeClass('bg-cyan').addClass('bg-green')
  470.                             }
  471.                         } else {
  472.                             swal({
  473.                                 title: "Sorry!",
  474.                                 text: "Your Action failed ! Reasons: "+(data.reasons).join(','),
  475.                                 imageUrl: BaseURL + "images/Bee_Sad_Emote.png"
  476.                             });
  477.                             alertify.success("Order Confirmation Failed");
  478. //                            $('#barcode_selector_cont').waitMe('hide');
  479.                         }
  480.                     })
  481.                     .fail(function () {
  482. //                        $('#barcode_selector_cont').waitMe('hide');
  483.                     });
  484.         })
  485.         $('#toast-action').on('click', function (e) {
  486.             toastr.clear();
  487.             toastr.options.closeButton = false;
  488.             toastr.options.progressBar = false;
  489.             toastr.options.debug = false;
  490.             toastr.options.positionClass = 'toast-bottom-left';
  491.             toastr.options.showDuration = 333;
  492.             toastr.options.hideDuration = 333;
  493.             toastr.options.timeOut = 2000;
  494.             toastr.options.extendedTimeOut = 1000;
  495.             toastr.options.showEasing = 'swing';
  496.             toastr.options.hideEasing = 'swing';
  497.             toastr.options.showMethod = 'slideDown';
  498.             toastr.options.hideMethod = 'slideUp';
  499.             var message = 'Marked as read. <button type="button" id="okBtn" class="btn btn-flat btn-success toastr-action">Undo</button>';
  500.             toastr.info(message, '');
  501.         });
  502.     });
  503. </script>
  504. {% endblock %}