[MM-54714] Change dnd status and remind to next morning 9 (#25472)
Этот коммит содержится в:
@@ -63,8 +63,8 @@ function PostReminderSubmenu(props: Props) {
|
|||||||
// add 2 hours in current time
|
// add 2 hours in current time
|
||||||
endTime = currentDate.add(2, 'hours');
|
endTime = currentDate.add(2, 'hours');
|
||||||
} else if (id === PostReminders.TOMORROW) {
|
} else if (id === PostReminders.TOMORROW) {
|
||||||
// add one day in current date
|
// set to next day 9 in the morning
|
||||||
endTime = currentDate.add(1, 'day');
|
endTime = currentDate.add(1, 'day').set({hour: 9, minute: 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(addPostReminder(props.userId, props.post.id, toUTCUnix(endTime.toDate())));
|
dispatch(addPostReminder(props.userId, props.post.id, toUTCUnix(endTime.toDate())));
|
||||||
@@ -112,7 +112,7 @@ function PostReminderSubmenu(props: Props) {
|
|||||||
|
|
||||||
let trailingElements = null;
|
let trailingElements = null;
|
||||||
if (postReminder === PostReminders.TOMORROW) {
|
if (postReminder === PostReminders.TOMORROW) {
|
||||||
const tomorrow = getCurrentMomentForTimezone(props.timezone).add(1, 'day').toDate();
|
const tomorrow = getCurrentMomentForTimezone(props.timezone).add(1, 'day').set({hour: 9, minute: 0}).toDate();
|
||||||
|
|
||||||
trailingElements = (
|
trailingElements = (
|
||||||
<span className={`postReminder-${postReminder}_timestamp`}>
|
<span className={`postReminder-${postReminder}_timestamp`}>
|
||||||
|
|||||||
@@ -152,14 +152,14 @@ exports[`components/StatusDropdown should match snapshot in default state 1`] =
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -467,14 +467,14 @@ exports[`components/StatusDropdown should match snapshot with custom status and
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -734,14 +734,14 @@ exports[`components/StatusDropdown should match snapshot with custom status enab
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -1001,14 +1001,14 @@ exports[`components/StatusDropdown should match snapshot with custom status expi
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -1269,14 +1269,14 @@ exports[`components/StatusDropdown should match snapshot with custom status puls
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -1511,14 +1511,14 @@ exports[`components/StatusDropdown should match snapshot with profile picture UR
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -1745,14 +1745,14 @@ exports[`components/StatusDropdown should match snapshot with status dropdown op
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -2012,14 +2012,14 @@ exports[`components/StatusDropdown should not show clear status button when cust
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
@@ -2327,14 +2327,14 @@ exports[`components/StatusDropdown should show clear status button when custom s
|
|||||||
className="dndTime-tomorrow_timestamp"
|
className="dndTime-tomorrow_timestamp"
|
||||||
>
|
>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
weekday="short"
|
weekday="short"
|
||||||
/>
|
/>
|
||||||
,
|
,
|
||||||
<FormattedTime
|
<FormattedTime
|
||||||
hour12={true}
|
hour12={true}
|
||||||
timeStyle="short"
|
timeStyle="short"
|
||||||
value={2021-11-03T22:48:57.000Z}
|
value={2021-11-03T09:00:57.000Z}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
|
|||||||
@@ -150,8 +150,8 @@ export class StatusDropdown extends React.PureComponent<Props, State> {
|
|||||||
endTime = currentDate.add(2, 'hours');
|
endTime = currentDate.add(2, 'hours');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// add one day in current date
|
// set to next day 9 in the morning
|
||||||
endTime = currentDate.add(1, 'day');
|
endTime = currentDate.add(1, 'day').set({hour: 9, minute: 0});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ export class StatusDropdown extends React.PureComponent<Props, State> {
|
|||||||
this.dndTimes.map(({id, label, labelDefault}, index) => {
|
this.dndTimes.map(({id, label, labelDefault}, index) => {
|
||||||
let text: React.ReactNode = localizeMessage(label, labelDefault);
|
let text: React.ReactNode = localizeMessage(label, labelDefault);
|
||||||
if (index === 3) {
|
if (index === 3) {
|
||||||
const tomorrow = getCurrentMomentForTimezone(this.props.timezone).add(1, 'day').toDate();
|
const tomorrow = getCurrentMomentForTimezone(this.props.timezone).add(1, 'day').set({hour: 9, minute: 0}).toDate();
|
||||||
text = (
|
text = (
|
||||||
<>
|
<>
|
||||||
{text}
|
{text}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user