• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

Missing action icons on the Data Grid (eye, edit, delete, etc.)

General Discussion
2
6
2.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    adebayoade last edited by 19 Sept 2022, 11:16

    Good day,

    The action icons are missing on the Data Grid. The screenshot below is the orders page missing the eye icon. Please guide me on how to fix this.

    I am running Bagisto version 1.3.1. Thanks.

    95eeb2b7-dd4a-474a-924c-35b8da55f494-image.png

    1 Reply Last reply Reply Quote 0
    • sanjay-webkul
      sanjay-webkul last edited by 20 Sept 2022, 04:48

      Hi there,
      Have you done any customization?

      A 1 Reply Last reply 20 Sept 2022, 06:35 Reply Quote 0
      • A
        adebayoade @sanjay-webkul last edited by 20 Sept 2022, 06:35

        @sanjay-webkul said in Missing action icons on the Data Grid (eye, edit, delete, etc.):

        Hi there,
        Have you done any customization?

        No. This is on stock Bagisto 1.3.1.

        1 Reply Last reply Reply Quote 0
        • sanjay-webkul
          sanjay-webkul last edited by 20 Sept 2022, 08:12

          Hi there,
          Please take a reference from Here

          A 1 Reply Last reply 23 Sept 2022, 07:12 Reply Quote 0
          • A
            adebayoade @sanjay-webkul last edited by adebayoade 23 Sept 2022, 07:12 23 Sept 2022, 07:12

            @sanjay-webkul said in Missing action icons on the Data Grid (eye, edit, delete, etc.):

            Hi there,
            Please take a reference from Here

            Thanks for the response. The implementation of the Datagrid on the commit is different from version 1.3.1 but the code is overall similar and does not solve my problem.

            Currently, the Datagrid behaves in a very weird manner. Sometimes the actions will show but it does not most of the time and replacing them with font-awesome icons does not fix the problem either. I believe this is a bug with Bagisto 1.3.1.

            <tbody>
                @if ($records instanceof \Illuminate\Pagination\LengthAwarePaginator && count($records))
                    @foreach ($records as $key => $record)
                        <tr>
                            @if ($enableMassActions)
                                <td>
                                    <span class="checkbox">
                                        <input type="checkbox" v-model="dataIds" @change="select" value="{{ $record->{$index} }}">
            
                                        <label class="checkbox-view" for="checkbox"></label>
                                    </span>
                                </td>
                            @endif
            
                            @foreach ($columns as $column)
                                @php
                                    $columnIndex = explode('.', $column['index']);
            
                                    $columnIndex = end($columnIndex);
                                @endphp
            
                                @if (isset($column['wrapper']))
                                    @if (isset($column['closure']) && $column['closure'] == true)
                                        <td data-value="{{ $column['label'] }}">{!! $column['wrapper']($record) !!}</td>
                                    @else
                                        <td data-value="{{ $column['label'] }}">{{ $column['wrapper']($record) }}</td>
                                    @endif
                                @else
                                    @if ($column['type'] == 'price')
                                        @if (isset($column['currencyCode']))
                                            <td data-value="{{ $column['label'] }}">{{ core()->formatPrice($record->{$columnIndex}, $column['currencyCode']) }}</td>
                                        @else
                                            <td data-value="{{ $column['label'] }}">{{ core()->formatBasePrice($record->{$columnIndex}) }}</td>
                                        @endif
                                    @else
                                        <td data-value="{{ $column['label'] }}">{{ $record->{$columnIndex} }}</td>
                                    @endif
                                @endif
                            @endforeach
            
                            @if ($enableActions)
                                <td class="actions" style="white-space: nowrap; width: 100px;" data-value="{{ __('ui::app.datagrid.actions') }}">
                                    <div class="action">
                                        @foreach ($actions as $action)
                                            @php
                                                $toDisplay = (isset($action['condition']) && gettype($action['condition']) == 'object') ? $action['condition']($record) : true;
                                            @endphp
            
                                            @if ($toDisplay)
                                                <a
                                                    id="{{ $record->{$action['index'] ?? $index} }}"
            
                                                    @if ($action['method'] == 'GET')
                                                    href="{{ route($action['route'], $record->{$action['index'] ?? $index}) }}"
                                                    @endif
            
                                                    @if ($action['method'] != 'GET')
                                                        @if (isset($action['function']))
                                                            v-on:click="{{$action['function']}}"
                                                        @else
                                                            v-on:click="doAction($event)"
                                                        @endif
                                                    @endif
            
                                                    data-method="{{ $action['method'] }}"
                                                    data-action="{{ route($action['route'], $record->{$index}) }}"
                                                    data-token="{{ csrf_token() }}"
            
                                                    @if (isset($action['target']))
                                                        target="{{ $action['target'] }}"
                                                    @endif
            
                                                    @if (isset($action['title']))
                                                        title="{{ $action['title'] }}"
                                                    @endif
                                                >
                                                    <span class="{{ $action['icon'] }}"></span>
                                                </a>
                                            @endif
                                        @endforeach
                                    </div>
                                </td>
                            @endif
                        </tr>
                    @endforeach
                @else
                    <tr>
                        <td colspan="10">
                            <p style="text-align: center;">{{ $norecords }}</p>
                        </td>
                    </tr>
                @endif
            </tbody>
            
            1 Reply Last reply Reply Quote 0
            • A
              adebayoade last edited by 28 Sept 2022, 04:57

              I fixed this by adding a true flag on the DataGrid action column and also changed to a different icon library. Thanks.

              1 Reply Last reply Reply Quote 0
              3 out of 6
              • First post
                3/6
                Last post