Aktualizace balicku, strnakovani, uprava hlavni stranky

This commit is contained in:
Michal Kváček
2023-12-12 23:42:16 +01:00
parent 8c7e237053
commit c8ea17c1ec
67 changed files with 1372 additions and 774 deletions
+7 -4
View File
@@ -2,11 +2,14 @@ import gql from "graphql-tag";
import {FRAGMENT_AIRCRAFT_FULL_INFO, FRAGMENT_AIRCRAFT_FULL_PRIVATE_INFO, FRAGMENT_AIRCRAFT_LIST_INFO} from "src/graphql/fragments/aircraft";
export const AIRCRAFTS_LIST = gql`
query AircraftsList {
aircrafts {
...aircraftListInfo
query AircraftsList ($limit: Int!, $offset: Int) {
aircrafts(limit: $limit, offset: $offset) {
totalItemsCount
items {
...aircraftListInfo
}
}
}
}
${FRAGMENT_AIRCRAFT_LIST_INFO}
`;
+48 -10
View File
@@ -3,13 +3,33 @@ import {FRAGMENT_FLIGHT_LIST_INFO} from "src/graphql/fragments/flight_list";
import {FRAGMENT_EVENT_FULL_INFO, FRAGMENT_EVENT_LIST_INFO} from "src/graphql/fragments/event";
export const EVENTS_LIST = gql`
query eventsList($username: String) {
events(username: $username) {
...eventListInfo
query eventsList($limit: Int!, $offset: Int) {
events(limit: $limit, offset: $offset) {
items {
...eventListInfo
flights {
titlePhoto {
thumbnailUrl
flights {
titlePhoto {
thumbnailUrl
}
}
}
}
}
${FRAGMENT_EVENT_LIST_INFO}
`;
export const EVENTS_PUBLIC_LIST = gql`
query eventsPublicList($username: String, $limit: Int!, $offset: Int) {
events(username: $username, limit: $limit, offset: $offset, public: true) {
items {
...eventListInfo
flights {
titlePhoto {
thumbnailUrl
}
}
}
}
@@ -19,16 +39,34 @@ ${FRAGMENT_EVENT_LIST_INFO}
`;
export const EVENT_DETAIL = gql`
query event($id: Int!, $username: String) {
event(id: $id, username: $username) {
query event($id: Int!) {
event(id: $id) {
...eventFullInfo
flights {
...flightListInfo
titlePhoto {
thumbnailUrl
}
}
}
}
${FRAGMENT_EVENT_FULL_INFO}
${FRAGMENT_FLIGHT_LIST_INFO}
`;
export const EVENT_PUBLIC_DETAIL = gql`
query eventPublicDetail($id: Int!, $username: String) {
event(id: $id, username: $username, public: true) {
...eventFullInfo
flights {
titlePhoto {
thumbnailUrl
}
}
}
}
${FRAGMENT_EVENT_FULL_INFO}
`;
+23 -10
View File
@@ -4,22 +4,35 @@ import {FRAGMENT_FLIGHT_LIST_INFO} from "src/graphql/fragments/flight_list";
import {FRAGMENT_PHOTO_FULL_INFO} from "src/graphql/fragments/photo";
export const FLIGHTS_LIST = gql`
query FlightsList {
flights {
...flightListInfo
query FlightsList($limit: Int!, $offset: Int) {
flights(limit: $limit, offset: $offset) {
totalItemsCount
items {
...flightListInfo
}
}
}
${FRAGMENT_FLIGHT_LIST_INFO}
`;
export const FLIGHTS_PUBLIC_LIST = gql`
query FlightsPublicList($username: String, $aircraftId: Int, $copilotId: Int, $pointOfInterestId: Int) {
flights(username: $username, aircraftId: $aircraftId, copilotId: $copilotId, pointOfInterestId: $pointOfInterestId, public: true) {
...flightListInfo
pilot {
id
publicUsername
query FlightsPublicList($username: String, $aircraftId: Int, $copilotId: Int, $pointOfInterestId: Int, $limit: Int!, $offset: Int) {
flights(
username: $username,
aircraftId: $aircraftId,
copilotId: $copilotId,
pointOfInterestId: $pointOfInterestId,
limit: $limit,
offset: $offset,
public: true
) {
totalItemsCount
items {
...flightListInfo
pilot {
id
publicUsername
}
}
}
}
+12 -6
View File
@@ -2,9 +2,12 @@ import gql from "graphql-tag";
import {FRAGMENT_POI_FULL_INFO, FRAGMENT_POI_FULL_PRIVATE_INFO, FRAGMENT_POI_LIST_INFO} from "src/graphql/fragments/poi";
export const POI_LIST = gql`
query poiList {
pointsOfInterest {
...pointOfInterestListInfo
query poiList($limit: Int!, $offset: Int) {
pointsOfInterest (limit: $limit, offset: $offset) {
totalItemsCount
items {
...pointOfInterestListInfo
}
}
}
@@ -12,9 +15,12 @@ ${FRAGMENT_POI_LIST_INFO}
`;
export const POI_PUBLIC_LIST = gql`
query poiList {
pointsOfInterest(public: true) {
...pointOfInterestListInfo
query poiList($limit: Int!, $offset: Int) {
pointsOfInterest(limit: $limit, offset: $offset, public: true) {
totalItemsCount
items {
...pointOfInterestListInfo
}
}
}