Skip to content

Commit ed1ecd9

Browse files
author
Diyor Khaydarov
committedFeb 16, 2025·
fix: missing translations for orders
1 parent 4a48ac9 commit ed1ecd9

File tree

6 files changed

+81
-17
lines changed

6 files changed

+81
-17
lines changed
 

‎modules/warehouse/presentation/locales/en.json

+10
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@
158158
"Title": "New warehouse order"
159159
}
160160
},
161+
"Out": {
162+
"Meta": {
163+
"Title": "New shipment"
164+
}
165+
},
166+
"In": {
167+
"Meta": {
168+
"Title": "New acceptance"
169+
}
170+
},
161171
"View": {
162172
"Meta": {
163173
"Title": "View warehouse order"

‎modules/warehouse/presentation/locales/ru.json

+10
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@
158158
"Title": "Новая накладная"
159159
}
160160
},
161+
"Out": {
162+
"Meta": {
163+
"Title": "Отгрузка"
164+
}
165+
},
166+
"In": {
167+
"Meta": {
168+
"Title": "Приемка"
169+
}
170+
},
161171
"View": {
162172
"Meta": {
163173
"Title": "Просмотр накладной"

‎modules/warehouse/presentation/locales/uz.json

+10
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@
158158
"Title": "Yangi nakladnoy"
159159
}
160160
},
161+
"Out": {
162+
"Meta": {
163+
"Title": "Jo'natish"
164+
}
165+
},
166+
"In": {
167+
"Meta": {
168+
"Title": "Qabul qilish"
169+
}
170+
},
161171
"View": {
162172
"Meta": {
163173
"Title": "Nakladnoyni ko'rish"

‎modules/website/presentation/assets/js/aichat.js

+8
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ class AiChatWidget extends HTMLElement {
1313

1414
this.shadowRoot.innerHTML = html;
1515

16+
const header = this.shadowRoot.getElementById("header");
1617
const textarea = this.shadowRoot.getElementById("message-textarea");
1718
const sendButton = this.shadowRoot.getElementById("send-button");
1819

20+
header.addEventListener("click", () => {
21+
const chatBody = this.shadowRoot.getElementById("body");
22+
const caretDown = this.shadowRoot.getElementById("caret-down");
23+
chatBody.classList.toggle("hidden");
24+
caretDown.classList.toggle("rotate-180");
25+
});
26+
1927
textarea.addEventListener("input", () => {
2028
sendButton.disabled = !textarea.value;
2129
});

‎modules/website/presentation/templates/pages/aichat/aichat.templ

+34-10
Original file line numberDiff line numberDiff line change
@@ -33,59 +33,74 @@ templ ChatIcon() {
3333
type Props struct {
3434
Title string
3535
Description string
36-
Starters []string
3736
}
3837

3938
templ chatCSS() {
4039
<style type="text/css">
4140
.wrapper {
41+
position: fixed;
42+
bottom: 0;
43+
right: 0;
4244
--primary-color: #2E67B4;
4345
--stroke-color: #BDC8D2;
4446
--btn-radius: 0.75rem;
4547

4648
border: 1px solid #ccc;
4749
border-radius: 0.5rem;
50+
width: 100%;
4851
max-width: 480px;
4952
}
5053

51-
.header{
54+
.wrapper .header{
5255
display: flex;
5356
flex-direction: row;
5457
align-items: center;
5558
gap: 0.5rem;
59+
width: 100%;
60+
cursor: pointer;
5661
background-color: var(--Black-colors-Color-black, #0A223E);
5762
color: var(--White-colors-Color-white, #FFFFFF);
5863
border-radius: 0.5rem 0.5rem 0 0;
5964
padding: 1.25rem;
6065
}
6166

62-
.header-text {
67+
.wrapper .hidden {
68+
display: none !important;
69+
}
70+
71+
.wrapper .rotate-180 {
72+
transform: rotate(180deg);
73+
animation: rotate 0.5s;
74+
}
75+
76+
.wrapper .header-text {
6377
flex: 1;
78+
text-align: left;
6479
}
6580

66-
.body {
81+
.wrapper .body {
6782
display: flex;
6883
flex-direction: column;
6984
gap: 0.75rem;
7085
padding: 1.25rem;
7186
}
7287

73-
.faq {
88+
.wrapper .faq {
7489
display: flex;
7590
flex-wrap: wrap;
7691
flex-direction: row;
7792
gap: 0.75rem;
7893
}
7994

80-
.faq-item {
95+
.wrapper .faq-item {
8196
cursor: pointer;
8297
border: 1px solid #ccc;
8398
border-radius: 9999px;
8499
padding: 0.75rem 1rem;
85100
font-size: 0.875rem;
86101
}
87102

88-
.textarea {
103+
.wrapper .textarea {
89104
border-radius: 0.5rem;
90105
padding: 1rem;
91106
resize: none;
@@ -136,7 +151,10 @@ templ chatCSS() {
136151
templ Chat(props Props) {
137152
@chatCSS()
138153
<div class="wrapper">
139-
<div class="header">
154+
<button
155+
id="header"
156+
class="header"
157+
>
140158
@ChatIcon()
141159
<div class="header-text">
142160
<div class="text-lg">
@@ -149,10 +167,16 @@ templ Chat(props Props) {
149167
<div>
150168
@icons.CaretDown(icons.Props{
151169
Size: "20",
170+
Attributes: templ.Attributes{
171+
"id": "caret-down",
172+
},
152173
})
153174
</div>
154-
</div>
155-
<div class="body">
175+
</button>
176+
<div
177+
id="body"
178+
class="body"
179+
>
156180
<textarea
157181
id="message-textarea"
158182
rows="7"

‎modules/website/presentation/templates/pages/aichat/aichat_templ.go

+9-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.