Fixed: Digital before Physical for normal release order

pull/2/head
Qstick 4 years ago
parent 74539d2025
commit d791f3f67f

@ -29,26 +29,25 @@ function MovieReleaseDates(props) {
</div> </div>
} }
{ {
!!physicalRelease && !!digitalRelease &&
<div > <div >
<span className={styles.dateIcon}> <span className={styles.dateIcon}>
<Icon <Icon
name={icons.DISC} name={icons.MOVIE_FILE}
/> />
</span> </span>
{getRelativeDate(physicalRelease, shortDateFormat, showRelativeDates, { timeFormat, timeForToday: false })} {getRelativeDate(digitalRelease, shortDateFormat, showRelativeDates, { timeFormat, timeForToday: false })}
</div> </div>
} }
{ {
!!digitalRelease && !!physicalRelease &&
<div > <div >
<span className={styles.dateIcon}> <span className={styles.dateIcon}>
<Icon <Icon
name={icons.MOVIE_FILE} name={icons.DISC}
/> />
</span> </span>
{getRelativeDate(digitalRelease, shortDateFormat, showRelativeDates, { timeFormat, timeForToday: false })} {getRelativeDate(physicalRelease, shortDateFormat, showRelativeDates, { timeFormat, timeForToday: false })}
</div> </div>
} }
</div> </div>

@ -215,23 +215,23 @@ class MovieIndexRow extends Component {
); );
} }
if (name === 'physicalRelease') { if (name === 'digitalRelease') {
return ( return (
<RelativeDateCellConnector <RelativeDateCellConnector
key={name} key={name}
className={styles[name]} className={styles[name]}
date={physicalRelease} date={digitalRelease}
component={VirtualTableRowCell} component={VirtualTableRowCell}
/> />
); );
} }
if (name === 'digitalRelease') { if (name === 'physicalRelease') {
return ( return (
<RelativeDateCellConnector <RelativeDateCellConnector
key={name} key={name}
className={styles[name]} className={styles[name]}
date={digitalRelease} date={physicalRelease}
component={VirtualTableRowCell} component={VirtualTableRowCell}
/> />
); );

@ -114,14 +114,14 @@ export const defaultState = {
isVisible: false isVisible: false
}, },
{ {
name: 'physicalRelease', name: 'digitalRelease',
label: 'Physical Release', label: 'Digital Release',
isSortable: true, isSortable: true,
isVisible: false isVisible: false
}, },
{ {
name: 'digitalRelease', name: 'physicalRelease',
label: 'Digital Release', label: 'Physical Release',
isSortable: true, isSortable: true,
isVisible: false isVisible: false
}, },

Loading…
Cancel
Save