UNPKG

phx-react

Version:

PHX REACT

123 lines 2.91 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.querySchoolYearHocvuV3 = exports.getActiveAndNextSchoolYearV3 = exports.querySchoolYearV3 = void 0; exports.querySchoolYearV3 = ` query MyQuery($school_id: Int!, $gte: timestamptz!, $lte: timestamptz!) { school_year( where: { deleted_at: { _is_null: true } school_course: { school_id: { _eq: $school_id } } end_at: { _gte: $gte } start_at: { _lte: $lte } } ) { id name code start_at end_at school_terms(where: { deleted_at: { _is_null: true } }) { id code name coefficient start_at end_at } current_term: school_terms( where: { deleted_at: { _is_null: true }, end_at: { _gte: $gte }, start_at: { _lte: $lte } } ) { id code name coefficient start_at end_at school_months( order_by: {start_date: asc} where: {deleted_at: {_is_null: true}} ) { id name start_date end_date } } } } `; exports.getActiveAndNextSchoolYearV3 = ` query GetActiveAndNextSchoolYear($startAt: timestamptz, $endAt: timestamptz, $school_id: Int) { school_year( where: { deleted_at: { _is_null: true } start_at: { _lte: $startAt } end_at: { _gte: $endAt } school_course: { school_id: { _eq: $school_id } } } order_by: { start_at: asc } ) { code end_at id name start_at school_terms(where: { deleted_at: { _is_null: true } }, order_by: { start_at: asc }) { name code id school_months( order_by: {start_date: asc} where: {deleted_at: {_is_null: true}} ) { id name start_date end_date } } school_course { course_name id code } } } `; exports.querySchoolYearHocvuV3 = ` query MyQuery($school_id: Int!, $gte: timestamptz!, $lte: timestamptz!) { school_year( where: { deleted_at: { _is_null: true } school_course: { school_id: { _eq: $school_id } } end_at: { _gte: $gte } start_at: { _lte: $lte } } ) { id name code start_at end_at school_terms(where: { deleted_at: { _is_null: true } }) { id code name coefficient hoc_vu_start_at hoc_vu_end_at } current_term: school_terms( where: { deleted_at: { _is_null: true }, hoc_vu_end_at: { _gte: $gte }, hoc_vu_start_at: { _lte: $lte } } ) { id code name coefficient hoc_vu_start_at hoc_vu_end_at } } } `; //# sourceMappingURL=index.js.map