mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 16:08:55 +03:30
testing
This commit is contained in:
@@ -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