File tree 6 files changed +81
-17
lines changed
warehouse/presentation/locales
6 files changed +81
-17
lines changed Original file line number Diff line number Diff line change 158
158
"Title" : " New warehouse order"
159
159
}
160
160
},
161
+ "Out" : {
162
+ "Meta" : {
163
+ "Title" : " New shipment"
164
+ }
165
+ },
166
+ "In" : {
167
+ "Meta" : {
168
+ "Title" : " New acceptance"
169
+ }
170
+ },
161
171
"View" : {
162
172
"Meta" : {
163
173
"Title" : " View warehouse order"
Original file line number Diff line number Diff line change 158
158
"Title" : " Новая накладная"
159
159
}
160
160
},
161
+ "Out" : {
162
+ "Meta" : {
163
+ "Title" : " Отгрузка"
164
+ }
165
+ },
166
+ "In" : {
167
+ "Meta" : {
168
+ "Title" : " Приемка"
169
+ }
170
+ },
161
171
"View" : {
162
172
"Meta" : {
163
173
"Title" : " Просмотр накладной"
Original file line number Diff line number Diff line change 158
158
"Title" : " Yangi nakladnoy"
159
159
}
160
160
},
161
+ "Out" : {
162
+ "Meta" : {
163
+ "Title" : " Jo'natish"
164
+ }
165
+ },
166
+ "In" : {
167
+ "Meta" : {
168
+ "Title" : " Qabul qilish"
169
+ }
170
+ },
161
171
"View" : {
162
172
"Meta" : {
163
173
"Title" : " Nakladnoyni ko'rish"
Original file line number Diff line number Diff line change @@ -13,9 +13,17 @@ class AiChatWidget extends HTMLElement {
13
13
14
14
this . shadowRoot . innerHTML = html ;
15
15
16
+ const header = this . shadowRoot . getElementById ( "header" ) ;
16
17
const textarea = this . shadowRoot . getElementById ( "message-textarea" ) ;
17
18
const sendButton = this . shadowRoot . getElementById ( "send-button" ) ;
18
19
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
+
19
27
textarea . addEventListener ( "input" , ( ) => {
20
28
sendButton . disabled = ! textarea . value ;
21
29
} ) ;
Original file line number Diff line number Diff line change @@ -33,59 +33,74 @@ templ ChatIcon() {
33
33
type Props struct {
34
34
Title string
35
35
Description string
36
- Starters []string
37
36
}
38
37
39
38
templ chatCSS () {
40
39
<style type =" text/css" >
41
40
.wrapper {
41
+ position : fixed ;
42
+ bottom : 0 ;
43
+ right : 0 ;
42
44
--primary-color : #2E67B4 ;
43
45
--stroke-color : #BDC8D2 ;
44
46
--btn-radius : 0.75rem ;
45
47
46
48
border : 1px solid #ccc ;
47
49
border-radius : 0.5rem ;
50
+ width : 100% ;
48
51
max-width : 480px ;
49
52
}
50
53
51
- .header {
54
+ .wrapper . header {
52
55
display : flex ;
53
56
flex-direction : row ;
54
57
align-items : center ;
55
58
gap : 0.5rem ;
59
+ width : 100% ;
60
+ cursor : pointer ;
56
61
background-color : var (--Black-colors-Color-black , #0A223E );
57
62
color : var (--White-colors-Color-white , #FFFFFF );
58
63
border-radius : 0.5rem 0.5rem 0 0 ;
59
64
padding : 1.25rem ;
60
65
}
61
66
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 {
63
77
flex : 1 ;
78
+ text-align : left ;
64
79
}
65
80
66
- .body {
81
+ .wrapper . body {
67
82
display : flex ;
68
83
flex-direction : column ;
69
84
gap : 0.75rem ;
70
85
padding : 1.25rem ;
71
86
}
72
87
73
- .faq {
88
+ .wrapper . faq {
74
89
display : flex ;
75
90
flex-wrap : wrap ;
76
91
flex-direction : row ;
77
92
gap : 0.75rem ;
78
93
}
79
94
80
- .faq-item {
95
+ .wrapper . faq-item {
81
96
cursor : pointer ;
82
97
border : 1px solid #ccc ;
83
98
border-radius : 9999px ;
84
99
padding : 0.75rem 1rem ;
85
100
font-size : 0.875rem ;
86
101
}
87
102
88
- .textarea {
103
+ .wrapper . textarea {
89
104
border-radius : 0.5rem ;
90
105
padding : 1rem ;
91
106
resize : none ;
@@ -136,7 +151,10 @@ templ chatCSS() {
136
151
templ Chat (props Props ) {
137
152
@ chatCSS ()
138
153
<div class =" wrapper" >
139
- <div class =" header" >
154
+ <button
155
+ id =" header"
156
+ class =" header"
157
+ >
140
158
@ ChatIcon ()
141
159
<div class =" header-text" >
142
160
<div class =" text-lg" >
@@ -149,10 +167,16 @@ templ Chat(props Props) {
149
167
<div >
150
168
@ icons.CaretDown (icons.Props {
151
169
Size : " 20" ,
170
+ Attributes : templ.Attributes {
171
+ " id" : " caret-down" ,
172
+ },
152
173
})
153
174
</div >
154
- </div >
155
- <div class =" body" >
175
+ </button >
176
+ <div
177
+ id =" body"
178
+ class =" body"
179
+ >
156
180
<textarea
157
181
id =" message-textarea"
158
182
rows =" 7"
You can’t perform that action at this time.
0 commit comments