radboy 0.0.598__py3-none-any.whl → 0.0.599__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of radboy might be problematic. Click here for more details.
- radboy/DB/OrderedAndRxd.py +47 -17
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- {radboy-0.0.598.dist-info → radboy-0.0.599.dist-info}/METADATA +1 -1
- {radboy-0.0.598.dist-info → radboy-0.0.599.dist-info}/RECORD +7 -7
- {radboy-0.0.598.dist-info → radboy-0.0.599.dist-info}/WHEEL +0 -0
- {radboy-0.0.598.dist-info → radboy-0.0.599.dist-info}/top_level.txt +0 -0
radboy/DB/OrderedAndRxd.py
CHANGED
|
@@ -50,7 +50,7 @@ class OrderAndRxdUi():
|
|
|
50
50
|
filte.append(getattr(OrderedAndRecieved,k)==src_dict[k])
|
|
51
51
|
return and_(*filte)
|
|
52
52
|
|
|
53
|
-
def OrderedAndRecieved_as(self,_exlcudes=[],as_=None):
|
|
53
|
+
def OrderedAndRecieved_as(self,_exlcudes=[],as_=None,item=None):
|
|
54
54
|
excludes=['oarid',]
|
|
55
55
|
for i in _exlcudes:
|
|
56
56
|
if i not in excludes:
|
|
@@ -76,6 +76,16 @@ class OrderAndRxdUi():
|
|
|
76
76
|
} for i in OrderedAndRecieved.__table__.columns if i.name not in excludes}
|
|
77
77
|
session.delete(tmp)
|
|
78
78
|
session.commit()
|
|
79
|
+
elif as_ == 'from_item':
|
|
80
|
+
if isinstance(item,OrderedAndRecieved):
|
|
81
|
+
fields={i.name:
|
|
82
|
+
{
|
|
83
|
+
'default':getattr(item,i.name),
|
|
84
|
+
'type':str(i.type).lower()
|
|
85
|
+
|
|
86
|
+
} for i in item.__table__.columns if i.name not in excludes}
|
|
87
|
+
else:
|
|
88
|
+
raise TypeError(item)
|
|
79
89
|
else:
|
|
80
90
|
raise Exception(f"Not a registered as_('{as_}')")
|
|
81
91
|
if fields is not None:
|
|
@@ -85,26 +95,42 @@ class OrderAndRxdUi():
|
|
|
85
95
|
def search(self,selector=False,menu=False):
|
|
86
96
|
terms,z=self.OrderedAndRecieved_as(as_=None)
|
|
87
97
|
terms=self.filter(terms)
|
|
88
|
-
def selectortext(results,page=False):
|
|
89
|
-
def edit(i):
|
|
90
|
-
|
|
98
|
+
def selectortext(results,page=False,self=self):
|
|
99
|
+
def edit(i,self=self):
|
|
100
|
+
edits=self.OrderedAndRecieved_as(as_="from_item",item=i)
|
|
101
|
+
with Session(ENGINE) as session:
|
|
102
|
+
e=session.query(OrderedAndRecieved).filter(OrderedAndRecieved.oarid==i.oarid).first()
|
|
103
|
+
if e is not None:
|
|
104
|
+
for k in edits[0]:
|
|
105
|
+
setattr(e,k,edits[0][k])
|
|
106
|
+
session.commit()
|
|
91
107
|
|
|
92
|
-
def delete(i):
|
|
93
|
-
|
|
108
|
+
def delete(i,self=self):
|
|
109
|
+
with Session(ENGINE) as session:
|
|
110
|
+
session.query(OrderedAndRecieved).filter(OrderedAndRecieved.oarid==i.oarid).delete()
|
|
111
|
+
session.commit()
|
|
94
112
|
|
|
95
113
|
htext=[]
|
|
96
114
|
for num,i in enumerate(results):
|
|
97
115
|
print(std_colorize(i,num,ct))
|
|
98
116
|
if page:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
117
|
+
ready=False
|
|
118
|
+
while not ready:
|
|
119
|
+
menu=Control(func=FormBuilderMkText,ptext="edit/e or r/rm/del/delete/dlt",helpText="edit or delete",data="string")
|
|
120
|
+
if menu is None:
|
|
121
|
+
continue
|
|
122
|
+
elif menu in ['d',]:
|
|
123
|
+
print(std_colorize(i,num,ct))
|
|
124
|
+
continue
|
|
125
|
+
elif menu in ['edt','ed','e']:
|
|
126
|
+
edit(i)
|
|
127
|
+
ready=True
|
|
128
|
+
elif menu in ['rm','r','del','delete','dlt']:
|
|
129
|
+
delete(i)
|
|
130
|
+
ready=True
|
|
131
|
+
else:
|
|
132
|
+
print(std_colorize(i,num,ct))
|
|
133
|
+
continue
|
|
108
134
|
|
|
109
135
|
|
|
110
136
|
if terms is not None:
|
|
@@ -152,6 +178,11 @@ class OrderAndRxdUi():
|
|
|
152
178
|
'desc':'search for OrderedAndRecieved',
|
|
153
179
|
'exec':lambda self=self:self.search()
|
|
154
180
|
}
|
|
181
|
+
self.cmds[uuid1()]={
|
|
182
|
+
'cmds':generate_cmds(startcmd=['sch','s','search'],endCmd=['m', 'menu','mnu']),
|
|
183
|
+
'desc':'search for OrderedAndRecieved with paged menu',
|
|
184
|
+
'exec':lambda self=self:self.search(menu=True)
|
|
185
|
+
}
|
|
155
186
|
|
|
156
187
|
#add cmds above
|
|
157
188
|
|
|
@@ -170,9 +201,8 @@ class OrderAndRxdUi():
|
|
|
170
201
|
self.cmds[cmd]['cmds'].pop(self.cmds[cmd]['cmds'].index(i))
|
|
171
202
|
htext.append(std_colorize(f"{self.cmds[cmd]['cmds']} - {self.cmds[cmd]['desc']}",xnum,ct))
|
|
172
203
|
htext=''.join(htext)
|
|
173
|
-
|
|
204
|
+
print(htext)
|
|
174
205
|
while True:
|
|
175
|
-
print(htext)
|
|
176
206
|
doWhat=Control(func=FormBuilderMkText,ptext=f"{self.__class__.__name__}:Do What what",helpText=htext,data="string")
|
|
177
207
|
if doWhat is None:
|
|
178
208
|
return
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.599'
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ radboy/Holidays.txt,sha256=y-JZPihh5iaWKxMIHNXD39yVuVmf1vMs4FdNDcg0f1Y,3114
|
|
|
5
5
|
radboy/InventoryGlossary.txt,sha256=018-Yqca6DFb10jPdkUY-5qhkRlQN1k3rxoTaERQ-LA,91008
|
|
6
6
|
radboy/RecordMyCodes.py,sha256=Lt2reA6xchq3U7Y08DvkrHboZ25i1ts7X2E9gSIwcVg,41101
|
|
7
7
|
radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
|
|
8
|
-
radboy/__init__.py,sha256=
|
|
8
|
+
radboy/__init__.py,sha256=Jqjxqe5hGoYG4FjoBW8m1z5tbVqkCZ0CFj9CfwUi3D0,17
|
|
9
9
|
radboy/api_key,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
radboy/case-export-2024-05-14-13-10-00.672971.xlsx,sha256=Wd592d_VLFmfUI9KKKSVjNwjV91euc1T7ATyvwvUhlg,5431
|
|
11
11
|
radboy/case-export-2024-05-14-13-13-22.540614.xlsx,sha256=OnGrhmScHfGp_mVaWW-LNMsqrQgyZDpiU3wV-2s3U5Q,5556
|
|
@@ -83,7 +83,7 @@ radboy/DB/DatePicker.py,sha256=B75mDtXQrkHRCpoU9TJsaBVvkK37ykMaJyaiqGOo4dM,18334
|
|
|
83
83
|
radboy/DB/DisplayItemDb.py,sha256=uVvrNyFyBuKvrw-BEPXKYvfa-QWyFN5ahESi2l6vUUA,52046
|
|
84
84
|
radboy/DB/EstimatedPayCalendarWorkSheet.txt,sha256=GOjRSmGxFoNTdAnpPe2kGv7CkXDrh0Mee01HslamGbo,17173
|
|
85
85
|
radboy/DB/ExerciseTracker.py,sha256=OS9i8jGIZPj-6m1bB0-eKNHQ6vf2iv_AYPEc0s4bkBM,27809
|
|
86
|
-
radboy/DB/OrderedAndRxd.py,sha256=
|
|
86
|
+
radboy/DB/OrderedAndRxd.py,sha256=D3tOqsD7qznmu1JVxXTW4xYu2smW2zcEfD03kK6qwDw,9306
|
|
87
87
|
radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
|
|
88
88
|
radboy/DB/PayModels.py,sha256=hjwWxP7PL33hmfzQl5YTf0HqzaMxXJxFknPdxFJXJc8,3499
|
|
89
89
|
radboy/DB/PrintLogging.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -401,7 +401,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
|
|
|
401
401
|
radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
|
|
402
402
|
radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
|
|
403
403
|
radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
|
|
404
|
-
radboy/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
404
|
+
radboy/__pycache__/__init__.cpython-313.pyc,sha256=TQo_KlHRT0nwTv47F32UFx3ocwsM--l0G_UDYZTQHxU,165
|
|
405
405
|
radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
|
|
406
406
|
radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
|
|
407
407
|
radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
|
|
@@ -429,7 +429,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
|
|
|
429
429
|
radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
|
|
430
430
|
radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
|
|
431
431
|
radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
|
|
432
|
-
radboy-0.0.
|
|
433
|
-
radboy-0.0.
|
|
434
|
-
radboy-0.0.
|
|
435
|
-
radboy-0.0.
|
|
432
|
+
radboy-0.0.599.dist-info/METADATA,sha256=5fihZQOzuW2002OOas3IDhGdZT00JGvRQONaregxcLo,1662
|
|
433
|
+
radboy-0.0.599.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
434
|
+
radboy-0.0.599.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
|
|
435
|
+
radboy-0.0.599.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|