File tree Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def build(self):
112
112
"""
113
113
Welcome to the Tuttle demo.
114
114
115
- 1. Getting started: Press the button below to install some demo data and start exploring some of the functions of the app:
115
+ 1. Getting started: Press the button below to install some demo data and start exploring some of the functions of the app.
116
116
"""
117
117
)
118
118
)
@@ -152,7 +152,7 @@ def update_content(self):
152
152
153
153
for contact in contacts :
154
154
self .main_column .controls .append (
155
- views .make_contact_view (contact ),
155
+ views .make_contact_view (contact , self ),
156
156
)
157
157
self .update ()
158
158
@@ -176,7 +176,7 @@ def update_content(self):
176
176
for contract in contracts :
177
177
self .main_column .controls .append (
178
178
# TODO: replace with view class
179
- views .make_contract_view (contract )
179
+ views .make_contract_view (contract , self )
180
180
)
181
181
self .update ()
182
182
@@ -199,7 +199,7 @@ def update_content(self):
199
199
200
200
for client in clients :
201
201
self .main_column .controls .append (
202
- views .make_client_view (client ),
202
+ views .make_client_view (client , self ),
203
203
)
204
204
self .update ()
205
205
Original file line number Diff line number Diff line change @@ -149,7 +149,10 @@ def get_address(self):
149
149
return ""
150
150
151
151
152
- def make_contact_view (contact : Contact ):
152
+ def make_contact_view (
153
+ contact : Contact ,
154
+ app_page ,
155
+ ):
153
156
return Card (
154
157
content = Container (
155
158
content = Column (
@@ -183,7 +186,10 @@ def make_contact_view(contact: Contact):
183
186
)
184
187
185
188
186
- def make_contract_view (contract : Contract ):
189
+ def make_contract_view (
190
+ contract : Contract ,
191
+ app_page ,
192
+ ):
187
193
return Card (
188
194
content = Container (
189
195
content = Column (
@@ -198,6 +204,9 @@ def make_contract_view(contract: Contract):
198
204
PopupMenuItem (
199
205
icon = icons .EDIT ,
200
206
text = "Edit" ,
207
+ on_click = lambda _ : app_page .app .snackbar_message (
208
+ "Sorry, editing data is not yet implemented"
209
+ ),
201
210
),
202
211
PopupMenuItem (
203
212
icon = icons .DELETE ,
@@ -300,6 +309,9 @@ def on_click_delete_project(event):
300
309
PopupMenuItem (
301
310
icon = icons .EDIT ,
302
311
text = "Edit" ,
312
+ on_click = lambda _ : app_page .app .snackbar_message (
313
+ "Sorry, editing data is not yet implemented"
314
+ ),
303
315
),
304
316
PopupMenuItem (
305
317
icon = icons .DELETE ,
@@ -325,7 +337,10 @@ def on_click_delete_project(event):
325
337
)
326
338
327
339
328
- def make_client_view (client : Client ):
340
+ def make_client_view (
341
+ client : Client ,
342
+ app_page ,
343
+ ):
329
344
return Card (
330
345
content = Container (
331
346
content = Column (
@@ -340,6 +355,9 @@ def make_client_view(client: Client):
340
355
PopupMenuItem (
341
356
icon = icons .EDIT ,
342
357
text = "Edit" ,
358
+ on_click = lambda _ : app_page .app .snackbar_message (
359
+ "Sorry, editing data is not yet implemented"
360
+ ),
343
361
),
344
362
PopupMenuItem (
345
363
icon = icons .DELETE ,
You can’t perform that action at this time.
0 commit comments