Modified how template list is generated to be a function to allow checking whether the templates can be printed.
This commit is contained in:
@@ -130,10 +130,10 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
|
||||
<Select mode="multiple">
|
||||
{Object.keys(TemplateList).map((i) => (
|
||||
<Select.Option
|
||||
key={TemplateList[i].key}
|
||||
value={TemplateList[i].key}
|
||||
key={TemplateList()[i].key}
|
||||
value={TemplateList()[i].key}
|
||||
>
|
||||
{TemplateList[i].title}
|
||||
{TemplateList()[i].title}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
@@ -252,10 +252,10 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
|
||||
<Select mode="multiple">
|
||||
{Object.keys(TemplateList).map((i) => (
|
||||
<Select.Option
|
||||
key={TemplateList[i].key}
|
||||
value={TemplateList[i].key}
|
||||
key={TemplateList()[i].key}
|
||||
value={TemplateList()[i].key}
|
||||
>
|
||||
{TemplateList[i].title}
|
||||
{TemplateList()[i].title}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
|
||||
@@ -60,8 +60,8 @@ export default function ShopInfoSpeedPrint({ bodyshop, form }) {
|
||||
]}
|
||||
>
|
||||
<Select mode="multiple">
|
||||
{Object.keys(TemplateList)
|
||||
.map((key) => TemplateList[key])
|
||||
{Object.keys(TemplateList())
|
||||
.map((key) => TemplateList()[key])
|
||||
.filter((template) => template.drivingId === "job")
|
||||
.map((template, idx) => (
|
||||
<Select.Option key={idx} value={template.key}>
|
||||
|
||||
Reference in New Issue
Block a user