mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-23 16:33:11 +08:00
265 lines
7 KiB
TypeScript
265 lines
7 KiB
TypeScript
import gql from 'graphql-tag';
|
|
|
|
export const ADD_WORKSHEET_TEMPLATE = gql`
|
|
mutation AddWorkSheetTemplate($payload: WorksheetTemplateInputType!) {
|
|
createWorksheetTemplate(payload: $payload) {
|
|
... on WorkSheetTemplateType {
|
|
__typename
|
|
uid
|
|
name
|
|
reserved
|
|
numberOfSamples
|
|
rows
|
|
cols
|
|
rowWise
|
|
worksheetType
|
|
instrumentUid
|
|
instrument {
|
|
uid
|
|
name
|
|
}
|
|
sampleTypeUid
|
|
sampleType {
|
|
uid
|
|
name
|
|
}
|
|
description
|
|
qcTemplate {
|
|
uid
|
|
name
|
|
description
|
|
qcLevels {
|
|
uid
|
|
level
|
|
}
|
|
}
|
|
qcLevels {
|
|
uid
|
|
level
|
|
}
|
|
analysisUid
|
|
analysis {
|
|
uid
|
|
name
|
|
}
|
|
state
|
|
}
|
|
|
|
... on OperationError {
|
|
__typename
|
|
error
|
|
suggestion
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const EDIT_WORKSHEET_TEMPLATE = gql`
|
|
mutation EditWorkSheetTemplate($uid: String!, $payload: WorksheetTemplateInputType!) {
|
|
updateWorksheetTemplate(uid: $uid, payload: $payload) {
|
|
... on WorkSheetTemplateType {
|
|
__typename
|
|
uid
|
|
name
|
|
reserved
|
|
numberOfSamples
|
|
rows
|
|
cols
|
|
rowWise
|
|
worksheetType
|
|
instrumentUid
|
|
instrument {
|
|
uid
|
|
name
|
|
}
|
|
sampleTypeUid
|
|
sampleType {
|
|
uid
|
|
name
|
|
}
|
|
description
|
|
qcTemplate {
|
|
uid
|
|
name
|
|
description
|
|
qcLevels {
|
|
uid
|
|
level
|
|
}
|
|
}
|
|
qcLevels {
|
|
uid
|
|
level
|
|
}
|
|
analysisUid
|
|
analysis {
|
|
uid
|
|
name
|
|
}
|
|
state
|
|
}
|
|
|
|
... on OperationError {
|
|
__typename
|
|
error
|
|
suggestion
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const ADD_WORKSHEET = gql`
|
|
mutation AddWorkSheet($analystUid: String!, $templateUid: String!, $count: Int) {
|
|
createWorksheet(analystUid: $analystUid, templateUid: $templateUid, count: $count) {
|
|
... on WorksheetListingType {
|
|
__typename
|
|
worksheets {
|
|
uid
|
|
worksheetId
|
|
numberOfSamples
|
|
assignedCount
|
|
analyst {
|
|
uid
|
|
auth {
|
|
uid
|
|
userName
|
|
}
|
|
firstName
|
|
lastName
|
|
}
|
|
instrumentUid
|
|
instrument {
|
|
uid
|
|
name
|
|
}
|
|
analysisUid
|
|
analysis {
|
|
uid
|
|
name
|
|
}
|
|
state
|
|
createdAt
|
|
}
|
|
}
|
|
|
|
... on OperationError {
|
|
__typename
|
|
error
|
|
suggestion
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const WORKSHEET_UPDATE = gql`
|
|
mutation UpdateWorkSheet(
|
|
$worksheetUid: String!
|
|
$analystUid: String
|
|
$instrumentUid: String
|
|
$methodUid: String
|
|
$action: String
|
|
$samples: [String!]
|
|
) {
|
|
updateWorksheet(
|
|
worksheetUid: $worksheetUid
|
|
analystUid: $analystUid
|
|
instrumentUid: $instrumentUid
|
|
methodUid: $methodUid
|
|
action: $action
|
|
samples: $samples
|
|
) {
|
|
... on WorkSheetType {
|
|
__typename
|
|
uid
|
|
numberOfSamples
|
|
sampleTypeUid
|
|
sampleType {
|
|
name
|
|
name
|
|
}
|
|
instrumentUid
|
|
instrument {
|
|
uid
|
|
name
|
|
}
|
|
templateUid
|
|
template {
|
|
uid
|
|
name
|
|
}
|
|
}
|
|
|
|
... on OperationError {
|
|
__typename
|
|
error
|
|
suggestion
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const EDIT_WORKSHEET_APPLY_TEMPLATE = gql`
|
|
mutation EditWorkSheetApplyTemplate($worksheetUid: String!, $templateUid: String!) {
|
|
updateWorksheetApplyTemplate(worksheetUid: $worksheetUid, templateUid: $templateUid) {
|
|
... on WorkSheetType {
|
|
__typename
|
|
uid
|
|
numberOfSamples
|
|
sampleTypeUid
|
|
sampleType {
|
|
name
|
|
name
|
|
}
|
|
instrumentUid
|
|
instrument {
|
|
uid
|
|
name
|
|
}
|
|
templateUid
|
|
template {
|
|
uid
|
|
name
|
|
}
|
|
}
|
|
|
|
... on OperationError {
|
|
__typename
|
|
error
|
|
suggestion
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const WORKSHEET_MANUAL_ASSIGN = gql`
|
|
mutation ManualyAssignWorsheet($uid: String!, $qcTemplateUid: String!, $analysesUids: [String!]!) {
|
|
updateWorksheetManualAssign(uid: $uid, qcTemplateUid: $qcTemplateUid, analysesUids: $analysesUids) {
|
|
... on WorkSheetType {
|
|
__typename
|
|
uid
|
|
numberOfSamples
|
|
sampleTypeUid
|
|
sampleType {
|
|
name
|
|
name
|
|
}
|
|
instrumentUid
|
|
instrument {
|
|
uid
|
|
name
|
|
}
|
|
templateUid
|
|
template {
|
|
uid
|
|
name
|
|
}
|
|
}
|
|
|
|
... on OperationError {
|
|
__typename
|
|
error
|
|
suggestion
|
|
}
|
|
}
|
|
}
|
|
`;
|