Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: criado service_dto_test #5

Draft
wants to merge 113 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
9a6bc51
test: criado service_dto_test
AdrianaBispo Sep 24, 2024
ac9b0f5
feat: criado professional entity
AdrianaBispo Sep 24, 2024
8ba36a9
test: criado test para professional entity
AdrianaBispo Sep 24, 2024
8d3a7d9
feat: criado arquivo de erro a entidade professional
AdrianaBispo Sep 24, 2024
39f5924
feat: criado create professional usecase
AdrianaBispo Sep 24, 2024
38ac314
feat: criado create professional usecase impl
AdrianaBispo Sep 24, 2024
fffdea9
:test_tube: test: criado professional usecase impl test
AdrianaBispo Sep 24, 2024
aadcfbf
:sparkles: feat: criado professional repository
AdrianaBispo Sep 24, 2024
03511ae
feat: criado delete professional usecase
AdrianaBispo Sep 24, 2024
a6baf12
fix: corrigida importação
AdrianaBispo Sep 24, 2024
0b37156
feat: criado delete professional impl
AdrianaBispo Sep 24, 2024
b9f2ff5
test: criado teste para delete professional usecase
AdrianaBispo Sep 24, 2024
45410d6
fix: importação
AdrianaBispo Sep 24, 2024
a86e874
feat: criado get all professional usecase
AdrianaBispo Sep 24, 2024
9632444
feat: criado get all professional usecase impl
AdrianaBispo Sep 24, 2024
3a20095
test: criado teste para get all clients
AdrianaBispo Sep 24, 2024
6f5fb8c
feat: geat professional usecase
AdrianaBispo Sep 24, 2024
132554b
feat: criado get professional usecase impl
AdrianaBispo Sep 24, 2024
fc266a3
test: criadp get client usecase impl test
AdrianaBispo Sep 24, 2024
754fcd7
feat: criado update professional usecase
AdrianaBispo Sep 24, 2024
6117d22
feat: criado update professional usecase impl
AdrianaBispo Sep 24, 2024
8de5406
test: criado update
AdrianaBispo Sep 24, 2024
d3358d7
pasta renomeada
AdrianaBispo Sep 24, 2024
ce9def0
fix: import corrigido
AdrianaBispo Sep 24, 2024
ad12427
fix: renomeado o arquivo para service_dto e corrigido o test
AdrianaBispo Sep 24, 2024
83de1a4
arquivo renomeado
AdrianaBispo Sep 24, 2024
0269d0b
fix: corrigido o nome da classe
AdrianaBispo Sep 24, 2024
3d556c1
fix: corrigido o nome da referencia
AdrianaBispo Sep 24, 2024
d081e0f
fix: corrigido import
AdrianaBispo Sep 24, 2024
9c79bad
fix: corrigido import
AdrianaBispo Sep 24, 2024
a565d6b
fix: corrigido import
AdrianaBispo Sep 24, 2024
8765387
fix: corrigida referencia
AdrianaBispo Sep 24, 2024
605899b
fix: corrigido import
AdrianaBispo Sep 24, 2024
1fa1f94
fix: corrigido import
AdrianaBispo Sep 24, 2024
2633317
fix: corrigido import
AdrianaBispo Sep 24, 2024
71f2828
fix: corrigido import
AdrianaBispo Sep 24, 2024
f3334cc
fix: headline6 foi substituido por titleLarge
AdrianaBispo Sep 24, 2024
92ee60a
adcionado ClientLocalDataSourceImpl
AdrianaBispo Sep 25, 2024
ea2d829
feat: criado new client controller
AdrianaBispo Sep 25, 2024
e98c78b
feat: criado client controller
AdrianaBispo Sep 25, 2024
fa05338
feat: criado data table client
AdrianaBispo Sep 25, 2024
1214bf4
feat: criado Button New Client
AdrianaBispo Sep 25, 2024
98a1f8d
feat: criado home
AdrianaBispo Sep 25, 2024
c1fa497
fix: deprecated
AdrianaBispo Sep 25, 2024
5f6cef5
fix: headline trocado por titleLarge
AdrianaBispo Sep 25, 2024
f9ff58f
fix: substituido por titleLarge
AdrianaBispo Sep 25, 2024
c9dca25
feat: gerado cliente controller g
AdrianaBispo Sep 25, 2024
349e5fb
feat: gerado newcliente controller g
AdrianaBispo Sep 25, 2024
1a5bba7
adcionado colocado responsividade no menu
AdrianaBispo Sep 25, 2024
bbf61fa
arquivos que não são mais utilizados
AdrianaBispo Sep 25, 2024
45c82f0
import atualizado
AdrianaBispo Sep 25, 2024
d8e4c68
:truck: chore: arquivos movidos
AdrianaBispo Sep 25, 2024
0b82352
arquivo não mais utilizado
AdrianaBispo Sep 25, 2024
d843eb0
não mais utilizados
AdrianaBispo Sep 27, 2024
50c71e9
chore: arquivo movido
AdrianaBispo Sep 27, 2024
d729293
não utilizado
AdrianaBispo Sep 27, 2024
ac70376
importação atualizada
AdrianaBispo Sep 27, 2024
8a94559
chore: caminho atualizado
AdrianaBispo Sep 27, 2024
b259dba
chore: caminho atualizado
AdrianaBispo Sep 27, 2024
24f6683
import atualizado
AdrianaBispo Sep 27, 2024
c0a6d8e
chore: atualizada a pasta
AdrianaBispo Sep 27, 2024
b94c509
refactore: alterado o valor do future
AdrianaBispo Sep 27, 2024
2066fd2
alterado o import
AdrianaBispo Sep 27, 2024
ab2acf4
refactore
AdrianaBispo Sep 27, 2024
f83b8e6
inserido final e alterado o caminho
AdrianaBispo Sep 27, 2024
3058383
alterado o caminho
AdrianaBispo Sep 27, 2024
c5e856f
caminho alterado
AdrianaBispo Sep 27, 2024
00cf443
refactore: adcionado final
AdrianaBispo Sep 27, 2024
ee1b0dd
chore: caminho alterado
AdrianaBispo Sep 27, 2024
5cc9b2b
refactore: adcionado final
AdrianaBispo Sep 27, 2024
636016b
refactore: adcionado apptextstyle
AdrianaBispo Sep 27, 2024
1395b9d
adcionado appBar
AdrianaBispo Sep 27, 2024
f807f50
feat: criado ProfessionlaDto
AdrianaBispo Sep 27, 2024
968975a
feat: criado professional datasource
AdrianaBispo Sep 27, 2024
585341b
refactore: renomeado o store
AdrianaBispo Sep 27, 2024
ff94265
refactore: variavel renomeada
AdrianaBispo Sep 27, 2024
f1b417c
feat: criado professional datasource local
AdrianaBispo Sep 27, 2024
a6171db
feat: criado professional repository
AdrianaBispo Sep 27, 2024
1c39ed7
:wastebasket: remove: arquivos removidos
AdrianaBispo Sep 27, 2024
4d2cdfb
chore: caminho alterado
AdrianaBispo Sep 27, 2024
9de02b9
:truck: chore: arquivo movido para nova pasta
AdrianaBispo Sep 27, 2024
21deb82
arquivo renomeado
AdrianaBispo Sep 27, 2024
ff49d63
feat: criado professional controller
AdrianaBispo Sep 27, 2024
feea1b7
feat: criado professional controller
AdrianaBispo Sep 27, 2024
fde952b
chore: movido
AdrianaBispo Sep 27, 2024
6b8fa24
arquivo duplicado
AdrianaBispo Sep 30, 2024
6d90137
chore: import atualizado
AdrianaBispo Oct 24, 2024
7d77358
chore: caminho atualizado
AdrianaBispo Oct 24, 2024
972ec86
alterado mensagem de salvamento
AdrianaBispo Oct 24, 2024
e0f1235
chore: import atualizado
AdrianaBispo Oct 24, 2024
8229642
atualizado
AdrianaBispo Oct 24, 2024
df16b15
adcionado ProfessionalModule
AdrianaBispo Oct 24, 2024
5c813ed
Merge branch 'sprint-2' of https://github.com/AdrianaBispo/agendament…
AdrianaBispo Oct 24, 2024
ee24c44
não utilizado
AdrianaBispo Oct 24, 2024
0b00215
movido para presentation
AdrianaBispo Oct 24, 2024
afe6275
movido para a pasta home
AdrianaBispo Oct 24, 2024
fc62c80
feat: criado edit client controller
AdrianaBispo Oct 24, 2024
12d0627
feat: input nome edit
AdrianaBispo Oct 24, 2024
6a04be5
feat: criado input telefone edit
AdrianaBispo Oct 24, 2024
971ea1f
adcionado update
AdrianaBispo Oct 24, 2024
99d62e1
feat: criado confim button
AdrianaBispo Oct 24, 2024
6a19c7a
feat: criado client data
AdrianaBispo Oct 24, 2024
351be59
feat: criado data table historic
AdrianaBispo Oct 24, 2024
549abe1
feat: criado client edit page
AdrianaBispo Oct 24, 2024
f423e21
feat: criado EmpityData
AdrianaBispo Oct 24, 2024
c954f41
chore: alterado os imports
AdrianaBispo Oct 25, 2024
cbf2e5f
feat: alterado o caminho
AdrianaBispo Oct 25, 2024
46c20c5
adcionado titleLarge e labelText
AdrianaBispo Oct 25, 2024
c6c27bb
adcionado titleLarge e labelText
AdrianaBispo Oct 25, 2024
fa9400d
chore: alterado a importação
AdrianaBispo Oct 25, 2024
8ad0137
chore: alterado a importação
AdrianaBispo Oct 25, 2024
6b099b9
chore: alterado o import
AdrianaBispo Oct 25, 2024
b3448fa
chore: alterado o caminho
AdrianaBispo Oct 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
32 changes: 32 additions & 0 deletions lib/app_module.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import 'package:flutter_modular/flutter_modular.dart';
import 'package:agenda/modules/clients/data/datasources/client_datasource.dart';
import 'package:agenda/modules/clients/data/datasources/local/client_datasource_local_datasource_impl.dart';
import 'package:agenda/modules/professional/professional_module.dart';
//view
import '../modules/start/presenter/view/start_page.dart';
//controller
import '../modules/start/presenter/controller/start_controller.dart';
//module
import 'package:agenda/modules/clients/clients_module.dart';


class AppModule extends Module {
@override
List<Bind> get binds => [
Bind.singleton((i) => StartController()),
Bind.singleton<ClientDataSource>((i) => ClientLocalDataSourceImpl()),

];

@override
List<ModularRoute> get routes => [
ChildRoute(
'/',
child: (context, args) => const StartPage(),
children: [
ModuleRoute('/clients', module: ClientsModule()),
ModuleRoute('/professional', module: ProfessionalModule()),
],
),
];
}
2 changes: 1 addition & 1 deletion lib/src/appwidget.dart → lib/appwidget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_modular/flutter_modular.dart';
import 'shared/utils/app_theme.dart';
import 'package:agenda/core/utils/app_theme.dart';

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
Expand Down
18 changes: 0 additions & 18 deletions lib/components/colors.dart

This file was deleted.

16 changes: 16 additions & 0 deletions lib/core/utils/app_textstyle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,20 @@ class AppTextStyle {
fontSize: 14,
fontWeight: FontWeight.normal,
);

TextStyle appBar = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: AppColor.instance.primary,
);

TextStyle titleLarge = TextStyle(
color: AppColor.instance.primaryText,
fontSize: 13,
);

TextStyle labelText = TextStyle(
color: AppColor.instance.primaryText,
fontSize: 14,
);
}
10 changes: 2 additions & 8 deletions lib/core/utils/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ class AppTheme {
dividerColor: AppColor.instance.accent3,
scaffoldBackgroundColor: AppColor.instance.primaryBackground,
textTheme: TextTheme(
headline6: TextStyle(
color: AppColor.instance.primaryText,
fontSize: 13,
),
titleLarge: AppTextStyle.instance.titleLarge,
),
inputDecorationTheme: InputDecorationTheme(
labelStyle: TextStyle(
color: AppColor.instance.primaryText,
fontSize: 14,
),
labelStyle:AppTextStyle.instance.labelText,
hintStyle: AppTextStyle.instance.hintText,
contentPadding: const EdgeInsets.symmetric(
vertical: 20.0,
Expand Down
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:agenda/src/app_module.dart';
import 'package:flutter/material.dart';
import 'package:flutter_modular/flutter_modular.dart';
import 'src/appwidget.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:agenda/app_module.dart';
import 'package:agenda/appwidget.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down
40 changes: 0 additions & 40 deletions lib/models/agenda.dart

This file was deleted.

29 changes: 0 additions & 29 deletions lib/models/cliente.dart

This file was deleted.

23 changes: 0 additions & 23 deletions lib/models/historico.dart

This file was deleted.

36 changes: 0 additions & 36 deletions lib/models/profissional.dart

This file was deleted.

20 changes: 0 additions & 20 deletions lib/models/servicos.dart

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import 'package:flutter_modular/flutter_modular.dart';
//contoller
//import 'home/store/clientehome_store.dart';
import 'newclient/controller/newclient_controller.dart';
import 'presenter/newclient/controller/newclient_controller.dart';
//view
import 'home/view/home.dart';
import 'newclient/view/newclient.dart';
import 'presenter/home/view/client_view.dart';
import 'presenter/newclient/view/newclient_view.dart';

class ClientsModule extends Module {
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '../client_datasource.dart';

class ClientLocalDataSourceImpl implements ClientDataSource {
Database? _dataBase;
final _clienteStore = intMapStoreFactory.store('clientes');
final _clientStore = intMapStoreFactory.store('client');


ClientLocalDataSourceImpl();
Expand All @@ -23,7 +23,7 @@ class ClientLocalDataSourceImpl implements ClientDataSource {
} else {
_dir = await Directory.systemTemp.createTemp();
}
final dBPath = join(_dir.path, 'Clientes.db');
final dBPath = join(_dir.path, 'client.db');
_dataBase = await databaseFactoryIo.openDatabase(dBPath);
return _dataBase;
}
Expand All @@ -34,7 +34,7 @@ class ClientLocalDataSourceImpl implements ClientDataSource {
//ordem alfabetica
SortOrder('name'),
]);
final recordSnapshots = await _clienteStore.find(
final recordSnapshots = await _clientStore.find(
await _initDatabase() as Database,
finder: finder,
);
Expand All @@ -48,7 +48,7 @@ class ClientLocalDataSourceImpl implements ClientDataSource {
Future<ClientDto> getClient({required int id}) async{
final filter = Finder(filter: Filter.equals('id', id));
var dataBase = await _initDatabase() as Database;
var snapshot = await _clienteStore.query(finder: filter).getSnapshot(dataBase);
var snapshot = await _clientStore.query(finder: filter).getSnapshot(dataBase);
final result = ClientDto.fromJson(snapshot!.value);
return result;
}
Expand All @@ -57,15 +57,15 @@ class ClientLocalDataSourceImpl implements ClientDataSource {
Future<void> deleteClient({required int id}) async {
final find = Finder(filter: Filter.equals('id', id));
var dataBase = await _initDatabase() as Database;
await _clienteStore.delete(dataBase, finder: find);
await _clientStore.delete(dataBase, finder: find);
}

@override
Future<ClientDto> updateClient({required ClientDto client}) async{
final find = Finder(filter: Filter.equals('id', client.id));
var dataBase = await _initDatabase() as Database;
await _clienteStore.update(dataBase, client.toJson(), finder: find);
var snapshot = await _clienteStore.query(finder: find).getSnapshot(dataBase);
await _clientStore.update(dataBase, client.toJson(), finder: find);
var snapshot = await _clientStore.query(finder: find).getSnapshot(dataBase);
final ClientDto result = ClientDto.fromJson(snapshot!.value);
return result;
}
Expand All @@ -80,9 +80,9 @@ class ClientLocalDataSourceImpl implements ClientDataSource {
final result = await dataBase.transaction(
(txn) async {
// Add the object, get the auto incremented id
var key = await _clienteStore.add(txn, client.toJson());
var key = await _clientStore.add(txn, client.toJson());
// Set the Id in our object
await _clienteStore.update(txn, {'id': key}, finder: find);
await _clientStore.update(txn, {'id': key}, finder: find);
},
);
return result;
Expand Down
Loading