mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 15:48:53 +03:30
test commit
This commit is contained in:
@@ -26,6 +26,7 @@ class MyItemsHistoryScreen extends StatefulWidget {
|
||||
class _MyItemsHistoryScreenState extends State<MyItemsHistoryScreen> {
|
||||
bool _isInit = true;
|
||||
ScrollController? sc;
|
||||
MyItemResultObject? itemData;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -34,13 +35,15 @@ class _MyItemsHistoryScreenState extends State<MyItemsHistoryScreen> {
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
void didChangeDependencies() async {
|
||||
if (_isInit) {
|
||||
itemData =
|
||||
ModalRoute.of(context)!.settings.arguments as MyItemResultObject?;
|
||||
var userResults = Provider.of<UsersProvider>(context);
|
||||
userResults.setLoading();
|
||||
userResults
|
||||
.getUsers(userResults.getUserMedicalCenter() as String)
|
||||
.then((_) {
|
||||
String medicalCenterId =
|
||||
await userResults.getUserMedicalCenter() as String;
|
||||
userResults.getUsers(medicalCenterId).then((_) {
|
||||
userResults.resetLoading();
|
||||
sc?.addListener(
|
||||
() {
|
||||
@@ -49,8 +52,7 @@ class _MyItemsHistoryScreenState extends State<MyItemsHistoryScreen> {
|
||||
context,
|
||||
listen: false,
|
||||
);
|
||||
userResults
|
||||
.getUsers(userResults.getUserMedicalCenter() as String);
|
||||
userResults.getUsers(medicalCenterId);
|
||||
}
|
||||
},
|
||||
);
|
||||
@@ -105,20 +107,13 @@ class _MyItemsHistoryScreenState extends State<MyItemsHistoryScreen> {
|
||||
MyItemsItemDataBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
hasHistoryBtn: false,
|
||||
items: MyItemsHistoryScreen().items!,
|
||||
items: itemData,
|
||||
isAdmin: userData['roles']?.contains('User')
|
||||
? false
|
||||
: true,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
height: 2.0,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
height: 20.0,
|
||||
),
|
||||
Expanded(
|
||||
child: Consumer<UsersProvider>(
|
||||
@@ -136,8 +131,7 @@ class _MyItemsHistoryScreenState extends State<MyItemsHistoryScreen> {
|
||||
children: [
|
||||
ItemHistoryDate(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
items:
|
||||
MyItemsHistoryScreen().items!,
|
||||
items: itemData!,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.0,
|
||||
|
||||
Reference in New Issue
Block a user