mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 05:08:56 +03:30
testing
This commit is contained in:
@@ -223,7 +223,8 @@ class _AppDrawerState extends State<AppDrawer> {
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.myItemsResultScreen);
|
||||
Navigator.of(context)
|
||||
.pushNamed(Routes.myPackagesResultScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
|
||||
|
||||
@@ -26,7 +26,7 @@ class ItemHistoryDate extends StatelessWidget {
|
||||
width: 6.0,
|
||||
),
|
||||
Text(
|
||||
items.fromDate!.toString(),
|
||||
items.fromDate.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w700,
|
||||
@@ -49,7 +49,7 @@ class ItemHistoryDate extends StatelessWidget {
|
||||
width: 6.0,
|
||||
),
|
||||
Text(
|
||||
items.toDate!.toString(),
|
||||
items.toDate.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
||||
@@ -130,7 +130,7 @@ class RequestsDataBox extends StatelessWidget {
|
||||
Provider.of<MyItemProvider>(context,
|
||||
listen: false)
|
||||
.verifyItemRequests(
|
||||
item!.id, 'approved')
|
||||
item!.requestId!, 'approved')
|
||||
.then((result) {
|
||||
if (result) {
|
||||
print('true');
|
||||
@@ -184,7 +184,7 @@ class RequestsDataBox extends StatelessWidget {
|
||||
Provider.of<MyItemProvider>(context,
|
||||
listen: false)
|
||||
.verifyItemRequests(
|
||||
item!.id, 'rejected')
|
||||
item!.requestId!, 'rejected')
|
||||
.then((result) {
|
||||
if (result) {
|
||||
print('false');
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:cssd/config/colors.dart';
|
||||
import 'package:cssd/models/my_package_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../../../config/routes.dart';
|
||||
|
||||
@@ -64,6 +65,30 @@ class MyPackagesItemDataBox extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 30 * _deviceBlockSize,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'Date:',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
DateFormat('y-M-d').format(
|
||||
DateTime.parse(
|
||||
packages!.createdAt,
|
||||
),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (isAdmin)
|
||||
Container(
|
||||
width: 30 * _deviceBlockSize,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:cssd/config/colors.dart';
|
||||
import 'package:cssd/models/my_package_model.dart';
|
||||
import 'package:cssd/providers/my_packages.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../config/routes.dart';
|
||||
@@ -61,6 +62,30 @@ class PackageRequestsDataBox extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 30 * _deviceBlockSize,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'Date:',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
DateFormat('y-M-d').format(
|
||||
DateTime.parse(
|
||||
package!.createdAt,
|
||||
),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (isAdmin)
|
||||
Container(
|
||||
width: 30 * _deviceBlockSize,
|
||||
@@ -107,7 +132,7 @@ class PackageRequestsDataBox extends StatelessWidget {
|
||||
Provider.of<MyPackageProvider>(context,
|
||||
listen: false)
|
||||
.verifyPackageRequests(
|
||||
package!.id, 'approved')
|
||||
package!.requestId!, 'approved')
|
||||
.then((result) {
|
||||
if (result) {
|
||||
print('true');
|
||||
@@ -161,7 +186,7 @@ class PackageRequestsDataBox extends StatelessWidget {
|
||||
Provider.of<MyPackageProvider>(context,
|
||||
listen: false)
|
||||
.verifyPackageRequests(
|
||||
package!.id, 'rejected')
|
||||
package!.requestId!, 'rejected')
|
||||
.then((result) {
|
||||
if (result) {
|
||||
print('false');
|
||||
|
||||
Reference in New Issue
Block a user