-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'edge' into rel_into_edge
Resolve conflicts in: * app/src/organisms/Devices/PipetteCard/__tests__/PipetteOverflowMenu.test.tsx * app/src/organisms/Devices/PipetteCard/index.tsx
- Loading branch information
Showing
430 changed files
with
13,265 additions
and
5,692 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { v4 as uuidv4 } from 'uuid' | ||
|
||
import type { Fixture } from '../types' | ||
|
||
export const DECK_CONFIG_STUB: { [fixtureLocation: string]: Fixture } = { | ||
B3: { fixtureLocation: 'B3', loadName: 'standardSlot', fixtureId: uuidv4() }, | ||
C3: { fixtureLocation: 'C3', loadName: 'extensionSlot', fixtureId: uuidv4() }, | ||
D3: { fixtureLocation: 'D3', loadName: 'wasteChute', fixtureId: uuidv4() }, | ||
} |
29 changes: 29 additions & 0 deletions
29
api-client/src/deck_configuration/createDeckConfiguration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// import { POST, request } from '../request' | ||
import { DECK_CONFIG_STUB } from './__stubs__' | ||
|
||
// import type { ResponsePromise } from '../request' | ||
import type { HostConfig } from '../types' | ||
import type { DeckConfiguration } from './types' | ||
|
||
// TODO(bh, 2023-09-26): uncomment and remove deck config stub when backend api is ready | ||
// export function createDeckConfiguration( | ||
// config: HostConfig, | ||
// data: DeckConfiguration | ||
// ): ResponsePromise<DeckConfiguration> { | ||
// return request<DeckConfiguration, { data: DeckConfiguration }>( | ||
// POST, | ||
// `/deck_configuration`, | ||
// { data }, | ||
// config | ||
// ) | ||
// } | ||
|
||
export function createDeckConfiguration( | ||
config: HostConfig, | ||
data: DeckConfiguration | ||
): Promise<{ data: DeckConfiguration }> { | ||
data.forEach(fixture => { | ||
DECK_CONFIG_STUB[fixture.fixtureLocation] = fixture | ||
}) | ||
return Promise.resolve({ data: Object.values(DECK_CONFIG_STUB) }) | ||
} |
30 changes: 30 additions & 0 deletions
30
api-client/src/deck_configuration/deleteDeckConfiguration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// import { DELETE, request } from '../request' | ||
import { DECK_CONFIG_STUB } from './__stubs__' | ||
|
||
// import type { ResponsePromise } from '../request' | ||
import type { EmptyResponse, HostConfig } from '../types' | ||
import type { Fixture } from './types' | ||
|
||
// TODO(bh, 2023-09-26): uncomment and remove deck config stub when backend api is ready | ||
// export function deleteDeckConfiguration( | ||
// config: HostConfig, | ||
// data: Fixture | ||
// ): ResponsePromise<EmptyResponse> { | ||
// const { fixtureLocation, ...rest } = data | ||
// return request<EmptyResponse, { data: Omit<Fixture, 'fixtureLocation'> }>( | ||
// DELETE, | ||
// `/deck_configuration/${fixtureLocation}`, | ||
// { data: rest }, | ||
// config | ||
// ) | ||
// } | ||
|
||
export function deleteDeckConfiguration( | ||
config: HostConfig, | ||
data: Fixture | ||
): Promise<EmptyResponse> { | ||
const { fixtureLocation } = data | ||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete | ||
delete DECK_CONFIG_STUB[fixtureLocation] | ||
return Promise.resolve({ data: null }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// import { GET, request } from '../request' | ||
import { DECK_CONFIG_STUB } from './__stubs__' | ||
|
||
// import type { ResponsePromise } from '../request' | ||
import type { HostConfig } from '../types' | ||
import type { DeckConfiguration } from './types' | ||
|
||
// TODO(bh, 2023-09-26): uncomment and remove deck config stub when backend api is ready | ||
// export function getDeckConfiguration( | ||
// config: HostConfig | ||
// ): ResponsePromise<DeckConfiguration> { | ||
// return request<DeckConfiguration>(GET, `/deck_configuration`, null, config) | ||
// } | ||
|
||
export function getDeckConfiguration( | ||
config: HostConfig | ||
): Promise<{ data: DeckConfiguration }> { | ||
return Promise.resolve({ data: Object.values(DECK_CONFIG_STUB) }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export { createDeckConfiguration } from './createDeckConfiguration' | ||
export { deleteDeckConfiguration } from './deleteDeckConfiguration' | ||
export { getDeckConfiguration } from './getDeckConfiguration' | ||
export { updateDeckConfiguration } from './updateDeckConfiguration' | ||
|
||
export * from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// TODO(bh, 2023-09-26): refine types and move to shared data when settled | ||
export type FixtureName = 'extensionSlot' | 'standardSlot' | 'wasteChute' | ||
export type FixtureLocation = 'B3' | 'C3' | 'D3' | ||
|
||
export interface Fixture { | ||
fixtureId: string | ||
fixtureLocation: FixtureLocation | ||
loadName: FixtureName | ||
} | ||
|
||
export type DeckConfiguration = Fixture[] |
32 changes: 32 additions & 0 deletions
32
api-client/src/deck_configuration/updateDeckConfiguration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { v4 as uuidv4 } from 'uuid' | ||
|
||
// import { PATCH, request } from '../request' | ||
import { DECK_CONFIG_STUB } from './__stubs__' | ||
|
||
// import type { ResponsePromise } from '../request' | ||
import type { HostConfig } from '../types' | ||
import type { Fixture } from './types' | ||
|
||
// TODO(bh, 2023-09-26): uncomment and remove deck config stub when backend api is ready | ||
// export function updateDeckConfiguration( | ||
// config: HostConfig, | ||
// data: Omit<Fixture, 'fixtureId'> | ||
// ): ResponsePromise<Fixture> { | ||
// const { fixtureLocation, ...rest } = data | ||
// return request<Fixture, { data: Omit<Fixture, 'fixtureLocation'> }>( | ||
// PATCH, | ||
// `/deck_configuration/${fixtureLocation}`, | ||
// { data: rest }, | ||
// config | ||
// ) | ||
// } | ||
|
||
export function updateDeckConfiguration( | ||
config: HostConfig, | ||
data: Omit<Fixture, 'fixtureId'> | ||
): Promise<{ data: Fixture }> { | ||
const { fixtureLocation } = data | ||
const fixtureId = uuidv4() | ||
DECK_CONFIG_STUB[fixtureLocation] = { ...data, fixtureId } | ||
return Promise.resolve({ data: DECK_CONFIG_STUB[fixtureLocation] }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.