Skip to content

Commit

Permalink
completes client feedback changes (#67)
Browse files Browse the repository at this point in the history
* remove duplicated items by bad merge

* add security tier

* change pass move token controller, change tokencontroller to authcontroller

* Corrige Bug al gueardar seeds

* Backend CheckLists

* Backend Signatures, Report COnfiguration repository, queires checklist, domain events

* Uploads service & Storage helper class, paths on settings

* solve typo in Shared proyect reference

* Fix Bug Querying CheckLists

* Ignore some local files

* Optional items in  query

* update dev branch  (#21)

* Pipelines Build & Deploy test (#20)

* remove duplicated items by bad merge

* add security tier

* change pass move token controller, change tokencontroller to authcontroller

* Corrige Bug al gueardar seeds

* Backend CheckLists

* Backend Signatures, Report COnfiguration repository, queires checklist, domain events

* Uploads service & Storage helper class, paths on settings

* solve typo in Shared proyect reference

* Fix Bug Querying CheckLists

* Ignore some local files

* Optional items in  query

* update pipeline

f

* fix publish route

* Update dotnet-core.yml

* build path

* Add test url to readme

* add demo credentials

* Solves Signature add and update bug

* simplify api routes

* Quering and DTO mappin for signatures

* Backend Reports Configurations

* Backend Reports Config

* preparing project to deploy

* updates composition api package version

* change to npm

* disable husky

* binds to 0.0.0.0

* Update dotnet-core.yml

* delete web.config

* dispatch pipelines

* solves vuetify failling in Production Stage

* upload pending file

* review indexjs

* updates dev branch from master (#40)

* pending file (#37)

* remove duplicated items by bad merge

* add security tier

* change pass move token controller, change tokencontroller to authcontroller

* Corrige Bug al gueardar seeds

* Backend CheckLists

* Backend Signatures, Report COnfiguration repository, queires checklist, domain events

* Uploads service & Storage helper class, paths on settings

* solve typo in Shared proyect reference

* Fix Bug Querying CheckLists

* Ignore some local files

* Optional items in  query

* update dev branch  (#21)

* Pipelines Build & Deploy test (#20)

* remove duplicated items by bad merge

* add security tier

* change pass move token controller, change tokencontroller to authcontroller

* Corrige Bug al gueardar seeds

* Backend CheckLists

* Backend Signatures, Report COnfiguration repository, queires checklist, domain events

* Uploads service & Storage helper class, paths on settings

* solve typo in Shared proyect reference

* Fix Bug Querying CheckLists

* Ignore some local files

* Optional items in  query

* update pipeline

f

* fix publish route

* Update dotnet-core.yml

* build path

* Add test url to readme

* add demo credentials

* Solves Signature add and update bug

* simplify api routes

* Quering and DTO mappin for signatures

* Backend Reports Configurations

* Backend Reports Config

* preparing project to deploy

* updates composition api package version

* change to npm

* disable husky

* binds to 0.0.0.0

* Update dotnet-core.yml

* delete web.config

* dispatch pipelines

* solves vuetify failling in Production Stage

* upload pending file

* fix index js

* Update package.json

* bugs review

* Rename Reports Feature

* Data Model Adjustmnets for adding support to reports aggregate

* Configure Test Seed, add editorconfig, fix queries bugs que null o 0 in totals

* adjustments call with jesus

* update gitignore, configure containers

* Creating new REports based on selected configuration, add new fields to report entity

* New Project structure, adds login

* Maquetado app macro and menus

* Pages titles

* Grids Checklist & reports Configs, stores, creates types, Authentication flow complete

* remove title

* startup poge must reports

* Create pending types

* Deletes duplicated type

* resolve some warnings

* Backend Adjustments

* New Grids: Signatures, reports, Create new Reports, all grids now can filter, remove, modales, adds messageDialogs

* organize login view, adds logo in toolbar

* organize code

* Include items in checks query

* mostrar items de checks

* mostrar error al inciar sesion

* Solver some bugs creating reports, add advanced filter to checkl;ists and signatures, adds idea for a dashbord with charts and some sorta valuable info

* missing packages and delete reports

* delete signatures

* Configura Forms Validations

* AddEdit Signatures

* update nuxt version, organize pages folder, change mode to spa

* cahnge redirection to options

* add edit Checklist & itmes back and UI

* componentes for reports editing

* reports checks tab

* dynamic signatures in report, some stayles changes

* Recover DeleteReportCommand

* Disable dropzone deployment error

* Use Input for uploads and remove dropzone, back add/edit/update photos

* bugsfix, edit photos, update checklists from report, update signatures, report validation when completed and available to close, udpate notes

* Block edit report when closed

* Block signatures edition when completed, prevent delete reports and signatures when closed

* Completes Cruds Operation, Reports Configurations and Reports Generations, Only Printing i spending

* Export Report as Pdf

* allow all  CORS origin for pictures

* Create PhotoRecords PDFs

* Fixes Las Review Bugs

* Remove Old Printing code

* customer feedback Revision

* users crud and flow adjustments

* Checklist, Notes and signature in the same tab

* adjust options for editing reports on index cards

* remove path fuction for edit option

* Final makeup
  • Loading branch information
ivaneliasoo authored Jul 24, 2020
1 parent 57e94c3 commit 17f03e1
Show file tree
Hide file tree
Showing 28 changed files with 783 additions and 141 deletions.
18 changes: 18 additions & 0 deletions DbScrtipts/RestoreDbInspections.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
delete from Inspections.CheckListParams
delete from Inspections.CheckListItems
delete from Inspections.CheckLists
delete from Inspections.Signatures
delete from Inspections.Notes
delete from Inspections.Photos
delete from Inspections.Reports
delete from Inspections.ReportsConfiguration
delete from Users

DBCC CHECKIDENT ('Inspections.CheckListParams', RESEED, 0);
DBCC CHECKIDENT ('Inspections.CheckListItems', RESEED, 0);
DBCC CHECKIDENT ('Inspections.CheckLists', RESEED, 0);
DBCC CHECKIDENT ('Inspections.Signatures', RESEED, 0);
DBCC CHECKIDENT ('Inspections.Notes', RESEED, 0);
DBCC CHECKIDENT ('Inspections.Photos', RESEED, 0);
DBCC CHECKIDENT ('Inspections.Reports', RESEED, 0);
DBCC CHECKIDENT ('Inspections.ReportsConfiguration', RESEED, 0);
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@ public class AddCheckListItemCommand : IRequest<bool>
[DataMember]
public CheckValue Checked { get; set; }
[DataMember]
public bool Editable { get; set; }
[DataMember]
public bool Required { get; set; }
[DataMember]
public string Remarks { get; set; }
[DataMember]
public List<CheckListParamDTO> ChecklistParams { get; set; }
private AddCheckListItemCommand() { }

public AddCheckListItemCommand(string text, CheckValue @checked, bool required, string remarks, List<CheckListParamDTO> checklistParams)
public AddCheckListItemCommand(string text, CheckValue @checked, bool editable, bool required, string remarks, List<CheckListParamDTO> checklistParams)
{
Text = text;
Checked = @checked;
Editable = editable;
Required = required;
Remarks = remarks;
ChecklistParams = checklistParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ public UpdateCheckListItemCommand(
int checkListId,
string text,
CheckValue @checked,
bool editable,
bool required,
string remarks)
{
Id = id;
CheckListId = checkListId;
Text = text;
Checked = @checked;
Editable = editable;
Required = required;
Remarks = remarks;
}
Expand All @@ -32,6 +34,7 @@ private UpdateCheckListItemCommand() { }
public int CheckListId { get; set; }
public string Text { get; set; }
public CheckValue Checked { get; set; }
public bool Editable { get; set; }
public bool Required { get; set; }
public string Remarks { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task<bool> Handle(AddCheckListItemCommand request, CancellationToke

var mappedCheckItems = CheckListMappingHelper.MapParams(request.ChecklistParams);

var newItem = new CheckListItem(request.IdCheckList, request.Text, request.Checked, request.Required, request.Remarks, mappedCheckItems);
var newItem = new CheckListItem(request.IdCheckList, request.Text, request.Checked, request.Editable, request.Required, request.Remarks, mappedCheckItems);

checkList.AddCheckItems(newItem);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public async Task<bool> Handle(UpdateCheckListItemCommand request, CancellationT
item.Checked = request.Checked;
item.Remarks = request.Remarks;
item.Required = request.Required;
item.Editable = request.Editable;
item.Text = request.Text;
checkList.AddCheckItems(item);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ internal static List<CheckListItem> MapItems(List<CheckListItemDTO> checklistIte
item.CheckListId,
item.Text,
item.Checked,
item.Editable,
item.Required,
item.Remarks,
MapParams(item.TextParams)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class CheckListItemDTO
public int CheckListId { get; set; }
public string Text { get; set; }
public CheckValue Checked { get; set; }
public bool Editable { get; set; }
public bool Required { get; set; }
public string Remarks { get; set; }
public List<CheckListParamDTO> TextParams { get; set; } = new List<CheckListParamDTO>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ public async Task<IActionResult> ChangePassword(string userName, ChangePasswordD
return BadRequest();
}

var user = _context.Users.Where(u => u.UserName == userName && u.Password == passwordDTO.CurrentPassword).FirstOrDefault();
// TODO: && u.Password == passwordDTO.CurrentPassword
var user = _context.Users.Where(u => u.UserName == userName).FirstOrDefault();

if (user == null || passwordDTO.NewPassword != passwordDTO.NewPasswordConfirmation)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public CheckList CloneForReport()
{
parameters.Add(new CheckListParam(null, 0, param.Key, param.Value, param.Type));
}
newCheckList.AddCheckItems(new CheckListItem(0, check.Text, check.Checked, check.Required, check.Remarks, parameters));
newCheckList.AddCheckItems(new CheckListItem(0, check.Text, check.Checked,check.Editable, check.Required, check.Remarks, parameters));
}
return newCheckList;
}
Expand All @@ -109,7 +109,7 @@ public CheckList CloneForReportConfiguration()
{
parameters.Add(new CheckListParam(null, 0, param.Key, param.Value, param.Type));
}
newCheckList.AddCheckItems(new CheckListItem(0, check.Text, check.Checked, check.Required, check.Remarks, parameters));
newCheckList.AddCheckItems(new CheckListItem(0, check.Text, check.Checked, check.Editable, check.Required, check.Remarks, parameters));
}
return newCheckList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ public class CheckListItem : Entity<int>
public int CheckListId { get; set; }
public string Text { get; set; }
public CheckValue Checked { get; set; }
public bool Editable { get; set; }
public bool Required { get; set; }
public string Remarks { get; set; }
public List<CheckListParam> TextParams { get; set; } = new List<CheckListParam>();

private CheckListItem() { } //Required by EF

public CheckListItem(int checkListId, string text, CheckValue @checked, bool required, string remarks, List<CheckListParam> textParams)
public CheckListItem(int checkListId, string text, CheckValue @checked, bool editable, bool required, string remarks, List<CheckListParam> textParams)
{
CheckListId = checkListId;
Text = text;
Checked = @checked;
Editable = editable;
Required = required;
Remarks = remarks;
TextParams = textParams;
Expand Down
3 changes: 2 additions & 1 deletion src/Backend/Inspections.Core/ReportsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public ReportsBuilder AddChecklists(int[] checklistsIds)

public ReportsBuilder AddSignatures(int[] signaturesIds)
{
var signatureToAdd = Configuration.SignatureDefinitions.Where(s => signaturesIds.Contains(s.Id));
var signatureToAdd = Configuration.SignatureDefinitions.Where(s => signaturesIds.Contains(s.Id))
.OrderByDescending(s => s.Principal);
_report.AddSignature(signatureToAdd.AsEnumerable());

return this;
Expand Down
Loading

0 comments on commit 17f03e1

Please sign in to comment.