Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5fd2008
Making export possible refs #85
nielsdrost7 Sep 7, 2025
4e0333e
Some more Export tests refs #85
nielsdrost7 Sep 7, 2025
f130658
Making export possible refs #85
nielsdrost7 Sep 7, 2025
80e30bc
Adds the maatwebsite/excel package and prepares all exports, export s…
nielsdrost7 Sep 7, 2025
bb19f7b
Intermediary commits for the exports refs #85
nielsdrost7 Sep 7, 2025
9389692
Intermediary commits for the exports refs #85
nielsdrost7 Sep 7, 2025
47363f0
Intermediary commits for the exports refs #85
nielsdrost7 Sep 7, 2025
9cb77a2
Exports for Projects, Tasks, Products, Payments, Invoices, Quotes, Ex…
nielsdrost7 Sep 7, 2025
051b314
Exports for Projects, Tasks, Products, Payments, Invoices, Quotes, Ex…
nielsdrost7 Sep 8, 2025
a2717a0
just a new phpstan baseline (8 more errors)
nielsdrost7 Sep 8, 2025
874b37e
Initial plan
Copilot Oct 26, 2025
272148e
Add report_templates disk and ReportTemplateFileRepository with tests
Copilot Oct 26, 2025
5ddb93b
Address code review feedback - add throw/report config, improve JSON …
Copilot Oct 26, 2025
3b8cade
Add ReportTemplate model and migration for ReportBuilder module (#117)
Copilot Oct 26, 2025
9d3d758
Add BlockDTO, GridPositionDTO, and BlockTransformer for ReportBuilder…
Copilot Oct 26, 2025
5026cb4
Implement ReportBuilder service layer with template management and PD…
Copilot Oct 26, 2025
2ea0243
Add Filament Admin resources and feature tests for ReportBuilder modu…
Copilot Oct 26, 2025
d763e2c
Update Modules/Clients/Exports/ContactsExport.php
nielsdrost7 Oct 26, 2025
e9d30c4
Update Modules/Clients/Models/Relation.php
nielsdrost7 Oct 26, 2025
9c0844f
Update Modules/Clients/Services/RelationExportService.php
nielsdrost7 Oct 26, 2025
870e5aa
Update Modules/Expenses/Exports/ExpensesExport.php
nielsdrost7 Oct 26, 2025
b10eac1
Update Modules/Expenses/Feature/Modules/ExpensesExportImportTest.php
nielsdrost7 Oct 26, 2025
945ed1d
Update Modules/Quotes/Filament/Company/Resources/Quotes/Pages/ListQuo…
nielsdrost7 Oct 26, 2025
ae28723
Update Modules/Projects/Feature/Modules/TasksExportImportTest.php
nielsdrost7 Oct 26, 2025
5e1e45e
Update Modules/ReportBuilder/Repositories/ReportTemplateFileRepositor…
nielsdrost7 Oct 26, 2025
1e1aa80
Address code review feedback: remove duplication, improve type safety…
Copilot Oct 27, 2025
043efc0
Fix duplicate code review issues: DTO initialization, enum serializat…
Copilot Oct 27, 2025
f8dc370
Merge branch 'develop' of github.com:InvoicePlane/InvoicePlane-v2 int…
nielsdrost7 Oct 27, 2025
cd94212
Merge branch 'develop' of github.com:InvoicePlane/InvoicePlane-v2 int…
nielsdrost7 Oct 27, 2025
79f05b2
Standardize test naming conventions and AAA comment structure (#125)
Copilot Oct 27, 2025
00e459e
Merge branch 'feature/85-core-export-clients-invoices-expenses-paymen…
nielsdrost7 Oct 27, 2025
9aeb760
Merge branch 'copilot/add-report-templates-disk' of github.com:Invoic…
nielsdrost7 Oct 27, 2025
7c0d83c
Update config/ip.php
nielsdrost7 Oct 27, 2025
dd033dc
ran pint
nielsdrost7 Oct 27, 2025
e6f12d0
Merge branch 'copilot/add-report-templates-disk' of github.com:Invoic…
nielsdrost7 Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Modules/Clients/Exports/ContactsExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace Modules\Clients\Exports;

use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;

class ContactsExport implements FromCollection, WithHeadings, WithMapping
{
protected Collection $contacts;

public function __construct(Collection $contacts)
{
$this->contacts = $contacts;
}

public function collection(): Collection
{
return $this->contacts;
}

public function headings(): array
{
return [
trans('ip.relation_name'),
trans('ip.type'),
trans('ip.contact_name'),
trans('ip.email'),
trans('ip.phone'),
trans('ip.gender'),
];
}

public function map(\Modules\Clients\Models\Contact $row): array
{
return [
$row->relation?->trading_name ?? $row->relation?->company_name ?? '',
$row->relation?->relation_type?->label() ?? '',
$row->full_name,
$row->email ?? null,
$row->phone ?? null,
$row->gender?->label() ?? '',
];
}
}
47 changes: 47 additions & 0 deletions Modules/Clients/Exports/ContactsLegacyExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace Modules\Clients\Exports;

use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;

class ContactsLegacyExport implements FromCollection, WithHeadings, WithMapping
{
protected Collection $contacts;

public function __construct(Collection $contacts)
{
$this->contacts = $contacts;
}

public function collection(): Collection
{
return $this->contacts;
}

public function headings(): array
{
return [
trans('ip.relation_name'),
trans('ip.type'),
trans('ip.contact_name'),
trans('ip.email'),
trans('ip.phone'),
trans('ip.gender'),
];
}

public function map($row): array
{
return [
$row->relation?->trading_name ?? $row->relation?->company_name ?? '',
$row->relation?->relation_type?->value ?? $row->relation?->relation_type?->name ?? '',
$row->full_name,
$row->email ?? null,
$row->phone ?? null,
$row->gender,
];
}
}
57 changes: 57 additions & 0 deletions Modules/Clients/Exports/RelationsExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace Modules\Clients\Exports;

use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;

class RelationsExport implements FromCollection, WithHeadings, WithMapping
{
protected Collection $relations;

public function __construct(Collection $relations)
{
$this->relations = $relations;
}

public function collection(): Collection
{
return $this->relations;
}

public function headings(): array
{
return [
trans('ip.primary_contact'),
trans('ip.relation_type'),
trans('ip.relation_status'),
trans('ip.relation_number'),
trans('ip.company_name'),
trans('ip.unique_name'),
trans('ip.coc_number'),
trans('ip.vat_number'),
trans('ip.language'),
trans('ip.email'),
trans('ip.phone'),
];
}

public function map($row): array
{
return [
$row->primary_contact,
$row->relation_type?->label() ?? '',
$row->relation_status?->label() ?? '',
$row->relation_number,
$row->company_name,
$row->unique_name,
$row->coc_number,
$row->vat_number,
$row->language,
$row->email ?? null,
$row->phone ?? null,
];
}
}
43 changes: 43 additions & 0 deletions Modules/Clients/Exports/RelationsLegacyExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

namespace Modules\Clients\Exports;

use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;

class RelationsLegacyExport implements FromCollection, WithHeadings, WithMapping
{
protected Collection $relations;

public function __construct(Collection $relations)
{
$this->relations = $relations;
}

public function collection(): Collection
{
return $this->relations;
}

public function headings(): array
{
return [
trans('ip.relation_type'),
trans('ip.trading_name'), // or company_name if trading_name is not set
trans('ip.email'),
trans('ip.phone'),
];
}

public function map($row): array
{
return [
$row->relation_type?->label() ?? '',
$row->trading_name ?? $row->company_name,
$row->email,
$row->phone,
];
}
}
Loading