2021-04-09 06:37:58 +08:00
|
|
|
import gql from 'graphql-tag';
|
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
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
|
|
|
|
}
|
2021-04-18 18:54:07 +08:00
|
|
|
}
|
2021-09-27 23:45:22 +08:00
|
|
|
}
|
2023-04-10 09:29:10 +08:00
|
|
|
`;
|
2021-12-30 04:46:14 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
export const EDIT_WORKSHEET_TEMPLATE = gql`
|
|
|
|
mutation EditWorkSheetTemplate($uid: FelicityID!, $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
|
|
|
|
}
|
2021-04-18 18:54:07 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
... on OperationError {
|
|
|
|
__typename
|
|
|
|
error
|
|
|
|
suggestion
|
|
|
|
}
|
2021-12-30 04:46:14 +08:00
|
|
|
}
|
|
|
|
}
|
2023-04-10 09:29:10 +08:00
|
|
|
`;
|
2021-12-30 04:46:14 +08:00
|
|
|
|
|
|
|
export const ADD_WORKSHEET = gql`
|
2023-04-10 09:29:10 +08:00
|
|
|
mutation AddWorkSheet($analystUid: FelicityID!, $templateUid: FelicityID!, $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
|
|
|
|
}
|
2021-06-10 04:56:54 +08:00
|
|
|
}
|
2021-04-18 18:54:07 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
... on OperationError {
|
|
|
|
__typename
|
|
|
|
error
|
|
|
|
suggestion
|
|
|
|
}
|
|
|
|
}
|
2021-04-18 18:54:07 +08:00
|
|
|
}
|
2023-04-10 09:29:10 +08:00
|
|
|
`;
|
2021-04-18 18:54:07 +08:00
|
|
|
|
2021-06-10 04:56:54 +08:00
|
|
|
export const WORKSHEET_UPDATE = gql`
|
2023-04-10 09:29:10 +08:00
|
|
|
mutation UpdateWorkSheet(
|
|
|
|
$worksheetUid: FelicityID!
|
|
|
|
$analystUid: FelicityID
|
|
|
|
$instrumentUid: FelicityID
|
|
|
|
$methodUid: FelicityID
|
|
|
|
$action: String
|
|
|
|
$samples: [FelicityID!]
|
|
|
|
) {
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2021-12-30 04:46:14 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
... on OperationError {
|
|
|
|
__typename
|
|
|
|
error
|
|
|
|
suggestion
|
|
|
|
}
|
|
|
|
}
|
2021-06-10 04:56:54 +08:00
|
|
|
}
|
2023-04-10 09:29:10 +08:00
|
|
|
`;
|
2021-06-10 04:56:54 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
export const EDIT_WORKSHEET_APPLY_TEMPLATE = gql`
|
|
|
|
mutation EditWorkSheetApplyTemplate($worksheetUid: FelicityID!, $templateUid: FelicityID!) {
|
|
|
|
updateWorksheetApplyTemplate(worksheetUid: $worksheetUid, templateUid: $templateUid) {
|
|
|
|
... on WorkSheetType {
|
|
|
|
__typename
|
|
|
|
uid
|
|
|
|
numberOfSamples
|
|
|
|
sampleTypeUid
|
|
|
|
sampleType {
|
|
|
|
name
|
|
|
|
name
|
|
|
|
}
|
|
|
|
instrumentUid
|
|
|
|
instrument {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
templateUid
|
|
|
|
template {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
2021-06-10 04:56:54 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
... on OperationError {
|
|
|
|
__typename
|
|
|
|
error
|
|
|
|
suggestion
|
|
|
|
}
|
2021-12-30 04:46:14 +08:00
|
|
|
}
|
2023-04-10 09:29:10 +08:00
|
|
|
}
|
|
|
|
`;
|
2022-06-19 04:29:47 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
export const WORKSHEET_MANUAL_ASSIGN = gql`
|
|
|
|
mutation ManualyAssignWorsheet($uid: FelicityID!, $qcTemplateUid: FelicityID!, $analysesUids: [FelicityID!]!) {
|
|
|
|
updateWorksheetManualAssign(uid: $uid, qcTemplateUid: $qcTemplateUid, analysesUids: $analysesUids) {
|
|
|
|
... on WorkSheetType {
|
|
|
|
__typename
|
|
|
|
uid
|
|
|
|
numberOfSamples
|
|
|
|
sampleTypeUid
|
|
|
|
sampleType {
|
|
|
|
name
|
|
|
|
name
|
|
|
|
}
|
|
|
|
instrumentUid
|
|
|
|
instrument {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
templateUid
|
|
|
|
template {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 04:29:47 +08:00
|
|
|
|
2023-04-10 09:29:10 +08:00
|
|
|
... on OperationError {
|
|
|
|
__typename
|
|
|
|
error
|
|
|
|
suggestion
|
|
|
|
}
|
2022-06-19 04:29:47 +08:00
|
|
|
}
|
2023-04-10 09:29:10 +08:00
|
|
|
}
|
|
|
|
`;
|