-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #366 from lahirulakruwan/main
Consumable get by organization bff changes added
- Loading branch information
Showing
14 changed files
with
606 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
campus/frontend/lib/avinya/asset_admin/lib/screens/consumable_weekly_report.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
|
||
import 'package:flutter/foundation.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../widgets/consumable_weekly_report.dart'; | ||
|
||
class ConsumableWeeklyReportScreen extends StatefulWidget { | ||
const ConsumableWeeklyReportScreen({super.key}); | ||
|
||
@override | ||
State<ConsumableWeeklyReportScreen> createState() => _ConsumableWeeklyReportScreenState(); | ||
} | ||
|
||
class _ConsumableWeeklyReportScreenState extends State<ConsumableWeeklyReportScreen> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
automaticallyImplyLeading: false, | ||
title: Text("Consumable Weekly Report"), | ||
), | ||
body: SingleChildScrollView( | ||
child: Container( | ||
child: ConsumableWeeklyReport(), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2019 Aleksander Woźniak | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import 'dart:collection'; | ||
|
||
import 'package:table_calendar/table_calendar.dart'; | ||
|
||
/// Example event class. | ||
class Event { | ||
final String title; | ||
|
||
const Event(this.title); | ||
|
||
@override | ||
String toString() => title; | ||
} | ||
|
||
/// Example events. | ||
/// | ||
/// Using a [LinkedHashMap] is highly recommended if you decide to use a map. | ||
final kEvents = LinkedHashMap<DateTime, List<Event>>( | ||
equals: isSameDay, | ||
hashCode: getHashCode, | ||
)..addAll(_kEventSource); | ||
|
||
final _kEventSource = Map.fromIterable(List.generate(50, (index) => index), | ||
key: (item) => DateTime.utc(kFirstDay.year, kFirstDay.month, item * 5), | ||
value: (item) => List.generate( | ||
item % 4 + 1, (index) => Event('Event $item | ${index + 1}'))) | ||
..addAll({ | ||
kToday: [ | ||
Event('Today\'s Event 1'), | ||
Event('Today\'s Event 2'), | ||
], | ||
}); | ||
|
||
int getHashCode(DateTime key) { | ||
return key.day * 1000000 + key.month * 10000 + key.year; | ||
} | ||
|
||
/// Returns a list of [DateTime] objects from [first] to [last], inclusive. | ||
List<DateTime> daysInRange(DateTime first, DateTime last) { | ||
final dayCount = last.difference(first).inDays + 1; | ||
return List.generate( | ||
dayCount, | ||
(index) => DateTime.utc(first.year, first.month, first.day + index), | ||
); | ||
} | ||
|
||
final kToday = DateTime.now(); | ||
final kFirstDay = DateTime(kToday.year, kToday.month - 3, kToday.day); | ||
final kLastDay = DateTime(kToday.year, kToday.month + 3, kToday.day); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.