Skip to content

fixed issue about trait update and add email link for support url #4023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,16 @@ export default function Item(props) {
} = props;

const hasModel = !_.isEmpty(device.model);
const secondLine = device.deviceType + (device.manufacturer ? ` | ${device.manufacturer}` : '')
+ (device.operatingSystem ? ` | ${device.operatingSystem}` : '');
const secondLineItems = [];
if (device.manufacturer) {
secondLineItems.push(device.manufacturer);
}
if (device.operatingSystem) {
secondLineItems.push(device.operatingSystem);
}

secondLineItems.push(device.deviceType);
const secondLine = secondLineItems.join(' | ');

return (
<div styleName={cn('container', { isEditing })}>
Expand Down
9 changes: 6 additions & 3 deletions src/shared/components/Settings/Tools/Devices/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default class Devices extends ConsentComponent {
* @param indexNo the device index no
*/
onDeleteDevice(indexNo) {
const { deviceTrait } = this.state;
const { deviceTrait, isEdit } = this.state;
const newDeviceTrait = { ...deviceTrait };
newDeviceTrait.traits.data.splice(indexNo, 1);
this.setState({
Expand All @@ -128,6 +128,9 @@ export default class Devices extends ConsentComponent {
isSubmit: false,
formInvalid: false,
});
if (isEdit) {
this.onCancelEditStatus();
}
}

/**
Expand Down Expand Up @@ -584,7 +587,7 @@ export default class Devices extends ConsentComponent {
Don&#39;t see your device?
</div>
<div styleName="help-text-email">
Contact Support at support@topcoder.com
Contact Support at <a href="mailto:support@topcoder.com">support@topcoder.com</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -709,7 +712,7 @@ export default class Devices extends ConsentComponent {
Don&#39;t see your device?
</div>
<div styleName="help-text-email">
Contact Support at support@topcoder.com
Contact Support at <a href="mailto:support@topcoder.com">support@topcoder.com</a>
</div>
</div>
</div>
Expand Down