Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include summaries in export #146

Open
bloodykheeng opened this issue Nov 16, 2023 · 6 comments
Open

Include summaries in export #146

bloodykheeng opened this issue Nov 16, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@bloodykheeng
Copy link

i have a table with summaries at the bottom but i acnt bulk export the table with those summaries
Inthat when i click bulk select the row for summaries isnt among the selectable ones
Below are some of the columns ive defined with summaries

TextColumn::make('sku')
->summarize(Range::make()->limit(5))

TextColumn::make('group_total')
->label('Total # of Group Members')
->sortable()
->numeric(
decimalPlaces: 0,
decimalSeparator: '.',
thousandsSeparator: ',',
)
->searchable()->toggleable(isToggledHiddenByDefault: false)
->summarize(Sum::make()->numeric()->label("")),

TextColumn::make('female_total')
->label('# of Female members')
->numeric(
decimalPlaces: 0,
decimalSeparator: '.',
thousandsSeparator: ',',
)
->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
->summarize(Sum::make()->numeric()->label("")),

TextColumn::make('below_35_total')
->label('Total # of members below 35 years')
->numeric(
decimalPlaces: 0,
decimalSeparator: '.',
thousandsSeparator: ',',
)
->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
->summarize(Sum::make()->numeric()->label("")),

            TextColumn::make('on_time_total')
                ->label('# of on-time payments')
                ->numeric(
                    decimalPlaces: 0,
                    decimalSeparator: '.',
                    thousandsSeparator: ',',
                )
                ->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
                ->summarize(Sum::make()->numeric()->label("")),

TextColumn::make('surplus_total')
->label('Surplus/Deficit')
->numeric(
decimalPlaces: 0,
decimalSeparator: '.',
thousandsSeparator: ',',
)
->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
->summarize(Sum::make()->numeric()->label("")),

            TextColumn::make('opd_total')
                ->label('# Member OPD')
                ->numeric(
                    decimalPlaces: 0,
                    decimalSeparator: '.',
                    thousandsSeparator: ',',
                )
                ->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
                ->summarize(Sum::make()->numeric()->label("")),

            TextColumn::make('ipd_total')
                ->label('# Member IPD')
                ->numeric(
                    decimalPlaces: 0,
                    decimalSeparator: '.',
                    thousandsSeparator: ',',
                )
                ->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
                ->summarize(Sum::make()->numeric()->label("")),

            TextColumn::make('percent_ontime_total')
                ->label('% paid ontime')
                ->numeric(
                    decimalPlaces: 0,
                    decimalSeparator: '.',
                    thousandsSeparator: ',',
                )
                ->suffix('%')
                ->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false),
            // ->summarize(Average::make()->numeric()->label("")),

            TextColumn::make('f_anc_attendance_total')
                ->label('Total 4th ANC visits')
                ->numeric(
                    decimalPlaces: 0,
                    decimalSeparator: '.',
                    thousandsSeparator: ',',
                )
                ->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
                ->summarize(Sum::make()->numeric()->label("")),

            TextColumn::make('f_anc_school_total')
                ->label('# 4th ANC school visits')
                ->numeric(
                    decimalPlaces: 0,
                    decimalSeparator: '.',
                    thousandsSeparator: ',',
                )
                ->sortable()->searchable()->toggleable(isToggledHiddenByDefault: false)
                ->summarize(Sum::make()->numeric()->label("")),

am using fillament v3

Any one to help

@pxlrbt
Copy link
Owner

pxlrbt commented Nov 16, 2023

There is just no support for it currently.

@pxlrbt pxlrbt changed the title Bulk export not exporting summarised columns Include summaries in export Nov 16, 2023
@pxlrbt pxlrbt added the enhancement New feature or request label Nov 16, 2023
@bloodykheeng
Copy link
Author

Any suggestions or ideas on how i can archieve it as i wait for future updates

@pxlrbt
Copy link
Owner

pxlrbt commented Nov 20, 2023

Not really, sorry. It's probably easiest to create a custom export via the underlying maatswebiste/laravel-excel package

@bloodykheeng
Copy link
Author

ok thanks lemi hope in future you add that. thaks fir the support though

@zindazed
Copy link

Would this be added in any time soon? seems important

@pxlrbt
Copy link
Owner

pxlrbt commented Dec 21, 2023

@zindazed I am not using Summaries anywhere in my projects, so I haven't implemented this yet. I am open for a clean PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants