Skip to content

Commit

Permalink
Merge pull request #66 from ezeep/feature/profile-defaults
Browse files Browse the repository at this point in the history
PrintNow shows only Grayscale but the printer is able to print with color.
  • Loading branch information
tp-shery authored Mar 12, 2024
2 parents 471532a + fc8a652 commit 0e4a552
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions src/components/ezp-printer-selection/ezp-printer-selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ export class EzpPrinterSelection {
title: i18next.t('printer_selection.duplex_short'),
},
]
public ColorOptions = [
{
id: 1,
title: i18next.t('printer_selection.color_color'),
},
{
id: 2,
title: i18next.t('printer_selection.color_grayscale'),
}
]
private printButton?: HTMLEzpTextButtonElement

/**
Expand Down Expand Up @@ -700,37 +710,17 @@ export class EzpPrinterSelection {
icon="color"
placeholder={i18next.t('printer_selection.select_color')}
toggleFlow="horizontal"
options={
this.selectedPrinterConfig.Color
? [
{
id: 1,
title: i18next.t('printer_selection.color_color'),
meta: '',
type: 'color',
},
{
id: 0,
title: i18next.t('printer_selection.color_grayscale'),
meta: '',
type: 'color',
},
]
: [
{
id: 0,
title: i18next.t('printer_selection.color_grayscale'),
meta: '',
type: 'color',
},
]
}
options={this.ColorOptions?.map((option) => ({
id: option.id,
title: option.title,
meta: '',
type: 'color'
}))}
preSelected={
this.selectedPrinter.id
? this.selectedPrinterConfig.Default?.Color == "color"
&& this.selectedPrinterConfig.Default?.Color == "color"
? i18next.t('printer_selection.color_color')
: i18next.t('printer_selection.color_grayscale')
: null
}
disabled={!this.selectedPrinterConfig.ColorSupported}
/>
Expand Down

0 comments on commit 0e4a552

Please sign in to comment.