Skip to content

Commit

Permalink
typo and linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgbowser committed Dec 15, 2022
1 parent f1af894 commit e684a6e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/src/assets/localization/en/robot_calibration.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"calibration_block_description": "<block>This block is a specially made tool that fits perfectly on your deck and helps with calibration. If you do not have a Calibration Block, please <supportLink>contact us</supportLink> so we can send you one.</block><block>While you wait for the block to arrive, you can use the flat surface on the trash bin of your robot instead.</block>",
"calibration_health_check": "Calibration Health Check",
"calibration_health_check_intro_body": "<block>Calibration Health Check diagnoses problems with Deck, Tip Length, and Pipette Offset Calibration.</block><block>You will move the pipettes to various positions, which will be compared against your existing calibration data.</block><block>If there is a large difference, you will be prompted to redo some or all of your calibrations.</block>",
"calibrate_tip_length": "Calibrate the length if a tip on this pipette.",
"calibrate_tip_length": "Calibrate the length of a tip on this pipette.",
"change_tip_rack": "Change tip rack",
"check_tip_on_block": "Check tip on block",
"check_tip_on_trash": "Check tip on trash bin",
Expand Down
49 changes: 38 additions & 11 deletions app/src/organisms/Devices/hooks/useGenerateTaskList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export function useGenerateTaskList(robotName: string): TaskListProps {
const pipetteTask: TaskProps = {
activeIndex: activeTaskIndices,
subTasks: [],
title: t(mount === 'left' ? 'devices_landing:left_mount' : 'devices_landing:right_mount'),
title: t(
mount === 'left'
? 'devices_landing:left_mount'
: 'devices_landing:right_mount'
),
description: '',
taskIndex,
taskListLength: TASK_LIST_LENGTH,
Expand Down Expand Up @@ -124,13 +128,19 @@ export function useGenerateTaskList(robotName: string): TaskListProps {
tipLengthSubTask.footer = t('robot_calibration:last_completed_on', {
timestamp: formatTimestamp(tipLengthCalForPipette.lastModified),
})
tipLengthSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} }
tipLengthSubTask.cta = {
label: t('robot_calibration:recalibrate'),
onClick: () => {},
}
tipLengthSubTask.isComplete = true

offsetSubTask.footer = t('robot_calibration:last_completed_on', {
timestamp: formatTimestamp(offsetCalForPipette.lastModified),
})
offsetSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} }
offsetSubTask.cta = {
label: t('robot_calibration:recalibrate'),
onClick: () => {},
}
offsetSubTask.isComplete = true

// also the parent pipette task can be marked as complete as well
Expand Down Expand Up @@ -158,14 +168,22 @@ export function useGenerateTaskList(robotName: string): TaskListProps {
// only updating this if it is still null, otherwise we'd be forgetting about the previous task that already modified this
activeTaskIndices = [taskIndex, 0]
}
tipLengthSubTask.description = t('robot_calibration:calibrate_tip_length')
tipLengthSubTask.cta = { label: t('robot_calibration:calibrate'), onClick: () => {} }
tipLengthSubTask.description = t(
'robot_calibration:calibrate_tip_length'
)
tipLengthSubTask.cta = {
label: t('robot_calibration:calibrate'),
onClick: () => {},
}
} else {
// the tip length calibration is present and valid
tipLengthSubTask.footer = t('robot_calibration:last_completed_on', {
timestamp: formatTimestamp(tipLengthCalForPipette.lastModified),
})
tipLengthSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} }
tipLengthSubTask.cta = {
label: t('robot_calibration:recalibrate'),
onClick: () => {},
}
tipLengthSubTask.isComplete = true
}

Expand All @@ -177,16 +195,25 @@ export function useGenerateTaskList(robotName: string): TaskListProps {
if (activeTaskIndices == null) {
activeTaskIndices = [taskIndex, 1]
}
offsetSubTask.description = t('robot_calibration:pipette_offset_calibration_on_mount', {
mount,
})
offsetSubTask.cta = { label: t('robot_calibration:calibrate'), onClick: () => {} }
offsetSubTask.description = t(
'robot_calibration:pipette_offset_calibration_on_mount',
{
mount,
}
)
offsetSubTask.cta = {
label: t('robot_calibration:calibrate'),
onClick: () => {},
}
} else {
// the tip length calibration is present and valid
offsetSubTask.footer = t('robot_calibration:last_completed_on', {
timestamp: formatTimestamp(offsetCalForPipette.lastModified),
})
offsetSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} }
offsetSubTask.cta = {
label: t('robot_calibration:recalibrate'),
onClick: () => {},
}
offsetSubTask.isComplete = true
}

Expand Down

0 comments on commit e684a6e

Please sign in to comment.