Skip to content

Commit

Permalink
Merge pull request bagisto#9431 from shivendra-webkul/export
Browse files Browse the repository at this point in the history
Added XLSX file support in export
  • Loading branch information
devansh-webkul authored Feb 9, 2024
2 parents 75e43b5 + c14a0f2 commit 81a0012
Show file tree
Hide file tree
Showing 21 changed files with 107 additions and 83 deletions.
1 change: 1 addition & 0 deletions packages/Webkul/Admin/src/Resources/lang/ar/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3874,6 +3874,7 @@
'export' => 'تصدير',
'no-records' => 'لا يوجد شيء للتصدير',
'xls' => 'XLS',
'xlsx' => 'إكس إل إس إكس',
],

'validations' => [
Expand Down
1 change: 1 addition & 0 deletions packages/Webkul/Admin/src/Resources/lang/bn/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3874,6 +3874,7 @@
'export' => 'পর্যাপন্ন করুন',
'no-records' => 'পর্যাপন্ন কিছু নেই',
'xls' => 'XLS',
'xlsx' => 'এক্সএলএসএক্স',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/de/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Herunterladen',
'export' => 'Exportieren',
'no-records' => 'Nichts zu exportieren',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Herunterladen',
'export' => 'Exportieren',
'no-records' => 'Nichts zu exportieren',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
1 change: 1 addition & 0 deletions packages/Webkul/Admin/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3874,6 +3874,7 @@
'export' => 'Export',
'no-records' => 'Nothing to export',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/es/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Descargar',
'export' => 'Exportar',
'no-records' => 'Nada que exportar',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Descargar',
'export' => 'Exportar',
'no-records' => 'Nada que exportar',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/fa/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'دانلود',
'export' => 'خروجی گرفتن',
'no-records' => 'چیزی برای خروجی گرفتن وجود ندارد',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'دانلود',
'export' => 'خروجی گرفتن',
'no-records' => 'چیزی برای خروجی گرفتن وجود ندارد',
'xls' => 'XLS',
'xlsx' => 'اکس ال اس ایکس',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/fr/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Télécharger',
'export' => 'Exporter',
'no-records' => 'Rien à exporter',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Télécharger',
'export' => 'Exporter',
'no-records' => 'Rien à exporter',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/he/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'הורדה',
'export' => 'ייצוא',
'no-records' => 'אין מידע לייצוא',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'הורדה',
'export' => 'ייצוא',
'no-records' => 'אין מידע לייצוא',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
12 changes: 7 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/hi_IN/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3870,11 +3870,13 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'डाउनलोड करें',
'export' => 'निर्यात',
'no-records' => 'निर्यात के लिए कुछ नहीं है',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'डाउनलोड करें',
'export' => 'निर्यात',
'no-records' => 'निर्यात के लिए कुछ नहीं है',
'xls' => 'XLS',
'xlsx' => 'एक्सएलएसएक्स',

],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/it/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3870,11 +3870,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Scarica',
'export' => 'Esporta',
'no-records' => 'Niente da esportare',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Scarica',
'export' => 'Esporta',
'no-records' => 'Niente da esportare',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/ja/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'ダウンロード',
'export' => 'エクスポート',
'no-records' => 'エクスポート対象がありません',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'ダウンロード',
'export' => 'エクスポート',
'no-records' => 'エクスポート対象がありません',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/nl/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Downloaden',
'export' => 'Exporteer',
'no-records' => 'Niets te exporteren',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Downloaden',
'export' => 'Exporteer',
'no-records' => 'Niets te exporteren',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/pl/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Pobierz',
'export' => 'Eksport',
'no-records' => 'Nic do wyeksportowania',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Pobierz',
'export' => 'Eksport',
'no-records' => 'Nic do wyeksportowania',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Télécharger',
'export' => 'Exporter',
'no-records' => 'Rien à exporter',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Télécharger',
'export' => 'Exporter',
'no-records' => 'Rien à exporter',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/ru/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3867,11 +3867,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Скачать',
'export' => 'Экспорт',
'no-records' => 'Нет данных для экспорта',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Скачать',
'export' => 'Экспорт',
'no-records' => 'Нет данных для экспорта',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/sin/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'බාගත කරන්න',
'export' => 'අපාරයට පිටවන්න',
'no-records' => 'අපාරයට හවුල් සාර්ථකවීමට හිතන්න',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'බාගත කරන්න',
'export' => 'අපාරයට පිටවන්න',
'no-records' => 'අපාරයට හවුල් සාර්ථකවීමට හිතන්න',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/tr/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'İndir',
'export' => 'Dışa Aktar',
'no-records' => 'Dışa aktarılacak hiçbir şey yok',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'İndir',
'export' => 'Dışa Aktar',
'no-records' => 'Dışa aktarılacak hiçbir şey yok',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/uk/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3869,11 +3869,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => 'Завантажити',
'export' => 'Експорт',
'no-records' => 'Нічого експортувати',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => 'Завантажити',
'export' => 'Експорт',
'no-records' => 'Нічого експортувати',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
11 changes: 6 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/zh_CN/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3868,11 +3868,12 @@
],

'export' => [
'csv' => 'CSV',
'download' => '下载',
'export' => '导出',
'no-records' => '没有要导出的内容',
'xls' => 'XLS',
'csv' => 'CSV',
'download' => '下载',
'export' => '导出',
'no-records' => '没有要导出的内容',
'xls' => 'XLS',
'xlsx' => 'XLSX',
],

'validations' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
name="format"
v-model="format"
>
<option value="csv">
@lang('admin::app.export.csv')
</option>

<option value="xls">
@lang('admin::app.export.xls')
</option>

<option value="csv">
@lang('admin::app.export.csv')
<option value="xlsx">
@lang('admin::app.export.xlsx')
</option>
</x-admin::form.control-group.control>
</x-admin::form.control-group>
Expand Down
2 changes: 1 addition & 1 deletion packages/Webkul/DataGrid/src/DataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function validatedRequest(): array
'sort' => ['sometimes', 'required', 'array'],
'pagination' => ['sometimes', 'required', 'array'],
'export' => ['sometimes', 'required', 'boolean'],
'format' => ['sometimes', 'required', 'in:xls,csv'],
'format' => ['sometimes', 'required', 'in:csv,xls,xlsx'],
]);

return request()->only(['filters', 'sort', 'pagination', 'export', 'format']);
Expand Down

0 comments on commit 81a0012

Please sign in to comment.