Skip to content

Commit 02c1b4b

Browse files
authored
Merge pull request #6350 from msupply-foundation/6230-Not-all-periods-shows-up-on-first-load
6230 not all periods shows up on first load
2 parents cbe8a96 + 489d0af commit 02c1b4b

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

client/packages/common/src/intl/locales/en/common.json

+1
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@
11791179
"message.nothing-to-save": "Nothing to save",
11801180
"message.placeholder-line": "A placeholder line has been created for additional requested quantity",
11811181
"message.placeholder-lines-cannot-be-returned": "Placeholder lines cannot be returned",
1182+
"message.program-period": "Only the first five historic and future periods are available for selection.",
11821183
"messages": "Messages",
11831184
"messages.acknowledge-breach-helptext": "Enter a comment and click OK to acknowledge the breach.",
11841185
"messages.ago": "{{time}} ago",

client/packages/requisitions/src/RequestRequisition/ListView/ProgramRequisitionOptions.tsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,20 @@ export const ProgramRequisitionOptions = ({
205205
/>
206206
<LabelAndOptions {...suppliers} optionKey="name" />
207207
<LabelAndOptions {...orderTypes} optionKey="name" />
208-
<LabelAndOptions {...periods} optionKey="name" />
208+
<Grid item width={'100%'}>
209+
<Typography
210+
sx={{
211+
fontStyle: 'italic',
212+
color: 'gray.main',
213+
fontSize: '12px',
214+
paddingLeft: 20,
215+
marginBottom: 0,
216+
}}
217+
>
218+
{t('message.program-period')}
219+
</Typography>
220+
<LabelAndOptions {...periods} optionKey="name" />
221+
</Grid>
209222
<Grid item>
210223
<ButtonWithIcon
211224
Icon={<PlusCircleIcon />}

client/packages/requisitions/src/ResponseRequisition/ListView/ProgramRequisitionOptions.tsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,20 @@ export const ProgramRequisitionOptions = ({
187187
/>
188188
<LabelAndOptions {...customers} optionKey="name" />
189189
<LabelAndOptions {...orderTypes} optionKey="name" />
190-
<LabelAndOptions {...periods} optionKey="name" />
190+
<Grid item width={'100%'}>
191+
<Typography
192+
sx={{
193+
fontStyle: 'italic',
194+
color: 'gray.main',
195+
fontSize: '12px',
196+
paddingLeft: 20,
197+
marginBottom: 0,
198+
}}
199+
>
200+
{t('message.program-period')}
201+
</Typography>
202+
<LabelAndOptions {...periods} optionKey="name" />
203+
</Grid>
191204
<Grid item>
192205
<ButtonWithIcon
193206
Icon={<PlusCircleIcon />}

server/service/src/requisition/program_settings/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use repository::{
55
use util::date_now;
66

77
// History = historic and current
8-
const MAX_NUMBER_OF_HISTORIC_PERIODS: usize = 2;
9-
const MAX_NUMBER_OF_FUTURE_PERIODS: usize = 2;
8+
const MAX_NUMBER_OF_HISTORIC_PERIODS: usize = 5;
9+
const MAX_NUMBER_OF_FUTURE_PERIODS: usize = 5;
1010

1111
/// Deduce if period is available for order_type based on
1212
/// matching period_schedule_id and number of requisition that exists for this

0 commit comments

Comments
 (0)