Skip to content

Commit

Permalink
Merge pull request #1051 from 5sControl/fix/1003-tasks-errors
Browse files Browse the repository at this point in the history
fix: tasks errors
  • Loading branch information
Dimskay1988 authored Jan 30, 2025
2 parents 26c2151 + 11485dc commit ad5d44b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions mobile/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"incorrectCredentials": "Incorrect email or password. Please, try again.",
"orderName": "Create order name and try again",
"validDate": "Please set a valid start date.",
"startTime": "The start time cannot be greater than the end time",
"finishDate": "The finish date cannot be earlier than the start date.",
"startTime": "The start time cannot be later than the end time",
"finishDate": "The end time cannot be earlier than the start time",
"timespanLimit": "The date cannot be from the future.",
"saveData": "Please save your data!",
"employeeNotFound": "Employee not found",
Expand Down Expand Up @@ -86,7 +86,7 @@
"name": "name",
"ordersView": "Orders View",
"products": "Products",
"tasks": "tasks",
"tasks": "Tasks",
"scheduled": "Show scheduled time",
"startTime": "Start time",
"datePlaceholder": "Select Date and Start Time",
Expand Down
10 changes: 5 additions & 5 deletions mobile/src/locales/pl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"incorrectCredentials": "Nieprawidłowy email lub hasło. Spróbuj ponownie.",
"orderName": "Utwórz nazwę zamówienia i spróbuj ponownie",
"validDate": "Proszę ustawić poprawną datę początkową.",
"startTime": "Czas rozpoczęcia nie może być większy niż czas zakończenia",
"finishDate": "Data zakończenia nie może być wcześniejsza niż data rozpoczęcia.",
"startTime": "Czas rozpoczęcia nie może być późniejsza niż godzina zakończenia",
"finishDate": "Czas zakończenia nie może być wcześniejszy niż czas rozpoczęcia",
"timespanLimit": "Data nie może pochodzić z przyszłości.",
"saveData": "Proszę zapisać swoje dane!",
"employeeNotFound": "Pracownik nie został znaleziony",
Expand Down Expand Up @@ -85,7 +85,7 @@
"name": "nazwa",
"ordersView": "Widok zamówień",
"products": "Produkty",
"tasks": "zadania",
"tasks": "Zadania",
"scheduled": "Pokaż zaplanowany czas",
"startTime": "Czas rozpoczęcia",
"datePlaceholder": "Wybierz datę i czas rozpoczęcia",
Expand Down Expand Up @@ -207,7 +207,7 @@
"implementationTime": "Czas realizacji",
"startOperation": "Początek operacji",
"operationTime": "Czas operacji:",
"timeOverlap": "Wybierz inny termin",
"timeOverlap": "Wybierz inny czas",
"finishOperation": "Koniec operacji",
"date": "Data",
"orderItems": "Węzły",
Expand Down Expand Up @@ -327,7 +327,7 @@
"done": "Zrobione",
"notFound":
{
"inProgress": "Brak bieżących zadań!",
"inProcess": "Brak bieżących zadań!",
"done": "Brak ukończonych zadań!"
}
}
Expand Down
4 changes: 2 additions & 2 deletions mobile/src/locales/ru/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"incorrectCredentials": "Неправильный email или пароль. Попробуйте еще раз.",
"orderName": "Создайте имя заказа и попробуйте еще раз",
"validDate": "Пожалуйста, установите правильную дату начала.",
"startTime": "Время начала не может быть больше времени окончания",
"finishDate": "Дата окончания не может быть раньше даты начала.",
"startTime": "Время начала не может быть позже времени окончания",
"finishDate": "Время окончания не может быть раньше времени начала",
"timespanLimit": "Дата не может быть из будущего.",
"saveData": "Пожалуйста, сохраните свои данные!",
"employeeNotFound": "Работник не найден",
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/pages/tasks/employeeTasks/EmployeeTasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const EmployeeTasks = () => {
const history = useHistory();
const [toastMessage, setToastMessage] = useState<string | null>(null);
const [searchText, setSearchText] = useState<string>("");
const [selectedSegment, setSelectedSegment] = useState<string>(TIMESPAN_STATES.DONE);
const [selectedSegment, setSelectedSegment] = useState<string>(TIMESPAN_STATES.INPROCESS);
const [loading, setLoading] = useState<boolean>(false);
const dateValue = format(new Date(), 'yyyy-MM-dd')+ 'T09:00:00.000Z';
const handleSetSearch = (value: string) => setSearchText(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
margin-left: 0;
color: #666;
font-size: 14px;
text-transform: lowercase;
}

.not-found-message{
Expand Down
5 changes: 2 additions & 3 deletions mobile/src/utils/parseInputDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export const formatDateWithFullMonthName = (dateString: string, language: string
"Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря"
],
pl: [
"Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec",
"Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"
"Stycznia", "Lutego", "Marca", "Kwietnia", "Maja", "Сzerwca",
"Lipca", "Sierpnia", "Września", "Października", "Listopada", "Grudnia"
]
};

Expand Down Expand Up @@ -143,7 +143,6 @@ export const updateTime = (originalDateTime: string, newTime: string) => {
}

export const getTimeDifference = (date1: string, date2: string) => {
let hours = 0, minutes = 0;
const dateObj1 = new Date(date1);
const dateObj2 = new Date(date2);

Expand Down

0 comments on commit ad5d44b

Please sign in to comment.