Skip to content

Commit

Permalink
PrintNow shows only Grayscale but the printer is able to print with c…
Browse files Browse the repository at this point in the history
…olor.
  • Loading branch information
tp-teman committed Mar 12, 2024
1 parent 03f1542 commit fc8a652
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 fc8a652

Please sign in to comment.