Skip to content

Commit

Permalink
UI Adjustments (#69)
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

* Make

* Solver bug when refreshing pega on server

* Align Checklist Check Control

* Align Check in large screen

* Fix bug when click on check all items having to click two times intead single click

* mantein check check all items and refresh

* make save button allway enabled

* remove unused variable

* configuration screep filters revision

* last Review, i think...
  • Loading branch information
ivaneliasoo authored Jul 26, 2020
1 parent 8a01266 commit ea1eeef
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public Signature PreparteForNewReport()
newSignature.Id = 0;
newSignature.ReportId = 0;
newSignature.ReportConfigurationId = null;
newSignature.Date = DateTime.Now;
newSignature.IsConfiguration = false;

return newSignature;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static IEnumerable<CheckList> AddCheckLists(InspectionsContext context)
var item1 = new CheckList(
"SITE CONDITIONS",
null,
"[√: acceptable / X: not acceptable / NA: not applicable ]",
"[√: acceptable / blank(unchecked): not acceptable / Dash(-): not applicable ]",
true
);
item1.AddCheckItems(new CheckListItem(0, "Access to MSB / Sub-Board / Distribution-Board",
Expand Down
25 changes: 13 additions & 12 deletions src/ClientApp/components/DatePickerBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:prepend-icon="showIcon ? 'event' : ''"
v-on="on"
@input="emitEvent(fechaPickerModel)"
@click:clear="limpiar()"
>
<template v-slot:append-outer="">
<slot name="append-outer" />
Expand All @@ -34,8 +35,8 @@ import moment from 'moment'
@Component
export default class DatePickerBase extends Vue {
@Prop() value:any;
@Prop({ default: 'Date' }) titulo:any;
@Prop({ required: true }) value:any;
@Prop({ default: 'Fecha' }) titulo:any;
@Prop() min:any;
@Prop() max:any;
@Prop({ default: false }) showIcon:Boolean | undefined;
Expand All @@ -44,10 +45,10 @@ export default class DatePickerBase extends Vue {
menu1:Boolean = false
get fechaPickerModel() {
if (this.value !== '' && this.value !== null && this.value !== undefined && this.value !== '0001-01-01T00:00:00+00:00')
if (this.value)
return this.fDateToYMD(this.value)
else
return this.fechaHoy
return this.value === '' ? null : this.$emit('input', this.fechaHoy)
}
set fechaPickerModel(valor) {
Expand All @@ -65,21 +66,21 @@ export default class DatePickerBase extends Vue {
return (this.fechaPickerModel !== null && this.fechaPickerModel !== undefined) ? this.fDateToDMY(this.fechaPickerModel) : ''
}
set fechaComputed(newValue) {
(newValue !== null && newValue !== undefined) ? this.fechaPickerModel = '' : this.fechaPickerModel = this.fDateToDMY(this.fechaPickerModel)
emitEvent(valor:any) {
this.$emit('input', valor ?? '')
}
emitEvent(valor: any) {
this.$emit('input', valor)
}
fDateToDMY (dateValue: any) {
fDateToDMY (dateValue:any) {
return moment(dateValue).format('DD/MM/YYYY')
}
fDateToYMD(dateValue: any) {
fDateToYMD(dateValue:any) {
return moment(dateValue).format('YYYY-MM-DD')
}
limpiar() {
this.$emit('input', '')
}
}
</script>

Expand Down
4 changes: 3 additions & 1 deletion src/ClientApp/components/MessageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn v-show="showYes" color="success" text @click="$emit('yes')">
<v-btn v-show="showYes" color="success" :loading="loading" text @click="$emit('yes')">
{{ yesText }}
</v-btn>
<v-btn v-show="showNo" color="error" text @click="$emit('no')">
Expand All @@ -44,6 +44,8 @@ export default class MessageDialog extends Vue {
@Model('input', { type: Boolean, required: true }) visible: Boolean = false
@Prop({ default: () => { return ['yes', 'no', 'cancel'] } }) actions!: Array<string>
@Prop({ default: 'Ok' }) yesText!: string
@Prop({ required: false }) loading!: boolean
get dialog (): Boolean {
return this.visible
Expand Down
5 changes: 4 additions & 1 deletion src/ClientApp/components/NewReportDialog.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<message-dialog v-model="value" :actions="['yes','cancel']" @yes="createReport" @cancel="$emit('input',false)">
<message-dialog v-model="value" :actions="['yes','cancel']" :loading="creatingReport" @yes="createReport" @cancel="$emit('input',false)">
<template v-slot:title="{}">
New Report
</template>
Expand Down Expand Up @@ -62,6 +62,7 @@ import { ValidationObserver, ValidationProvider } from 'vee-validate'
})
export default class NewReportDialog extends Vue {
@Prop() value!: boolean
creatingReport: boolean = false
$refs!: {
obs: InstanceType<typeof ValidationObserver>
}
Expand All @@ -73,13 +74,15 @@ export default class NewReportDialog extends Vue {
async createReport () {
if(await this.$refs.obs.validate() === true){
this.creatingReport =true
const reportId = await this.$store.dispatch('reportstrore/createReport', this.newReport, { root: true })
.then((resp) => {
this.$store.dispatch('reportstrore/getReports', '', { root: true })
this.$emit('input', false)
this.$emit('report-created', resp)
})
await this.$store.dispatch('users/setUserLastEditedReport', { userName: this.$auth.user.userName, lastEditedReport: reportId }, { root: true })
this.creatingReport = false
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ClientApp/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export default {
** See https://axios.nuxtjs.org/options
*/
axios: {
baseURL: 'https://localhost:44388',
browserBaseURL: 'https://localhost:44388'
baseURL: 'https://inspectionsscb.azurewebsites.net',
browserBaseURL: 'https://inspectionsscb.azurewebsites.net'
},
router: {
middleware: ['auth']
Expand Down
4 changes: 2 additions & 2 deletions src/ClientApp/pages/CheckLists/_id/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</v-row>
</ValidationObserver>
</message-dialog>
<ValidationObserver tag="form" v-slot="{ valid, dirty }">
<ValidationObserver tag="form" v-slot="{ valid }">
<v-row align="center" justify="space-between">
<v-col cols="12" md="6">
<ValidationProvider rules="required" v-slot="{errors}">
Expand All @@ -62,7 +62,7 @@
<v-checkbox v-model="currentCheckList.isConfiguration" label="Use in Config" />
</v-col>
<v-col cols="1">
<v-btn :disabled="!valid || !dirty" icon text color="success" @click="saveCheckList">
<v-btn :disabled="!valid" icon text color="success" @click="saveCheckList">
<v-icon>mdi-check</v-icon>
</v-btn>
</v-col>
Expand Down
8 changes: 4 additions & 4 deletions src/ClientApp/pages/CheckLists/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class CheckListsPage extends mixins(InnerPageMixin) {
filter: FilterType = {
filterText: '',
inConfigurationOnly: true,
repotId: undefined,
reportId: 1001,
reportConfigurationId: 1
}
Expand Down Expand Up @@ -196,9 +196,9 @@ export default class CheckListsPage extends mixins(InnerPageMixin) {
console.log(query)
let filter: FilterType = {
filterText: '',
inConfigurationOnly: query.configurationonly ?? true,
repotId: query.reportid ?? undefined,
reportConfigurationId: parseInt(query.configurationid) ?? undefined
inConfigurationOnly: query.configurationonly === 'true' ? true:false ?? true,
reportId: query.reportid ? parseInt(query.reportid) : undefined,
reportConfigurationId: query.configurationid ? parseInt(query.configurationid) : undefined
}
return {
filter
Expand Down
2 changes: 1 addition & 1 deletion src/ClientApp/pages/Configurations/_id/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default class AddEditReportConiguration extends mixins(InnerPageMixin){
const filter: FilterType = {
filterText: '',
inConfigurationOnly: true,
repotId: undefined,
reportId: undefined,
reportConfigurationId: undefined
}
await store.dispatch('checklists/getChecklists', filter, { root: true })
Expand Down
38 changes: 28 additions & 10 deletions src/ClientApp/pages/Reports/_id/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
message="your are about to close this report."
:code="currentReport.id"
:description="currentReport.name"
:loading="savingNewReport"
@yes="currentReport.isClosed = true; saveReportChanges(); dialogClose = false; currentReport.isClosed = true;"
@no="currentReport.isClosed = true"
/>
Expand All @@ -14,7 +15,7 @@
<ValidationObserver ref="obs" tag="form" v-slot="{ valid }">
<v-row align="center" justify="space-between">
<v-col cols="6">
<ValidationProvider rules="required" v-slot="{ errors }">
<ValidationProvider rules="required" immediate v-slot="{ errors }">
<v-text-field
:readonly="currentReport.isClosed"
v-model="currentReport.name"
Expand All @@ -33,7 +34,7 @@
</v-row>
<v-row>
<v-col>
<ValidationProvider rules="required" v-slot="{ errors }">
<ValidationProvider rules="required" immediate v-slot="{ errors }">
<v-textarea label="Address" rows="2 "
:readonly="currentReport.isClosed"
v-model="currentReport.address"
Expand All @@ -42,9 +43,9 @@
</ValidationProvider>
</v-col>
</v-row>
<v-row>
<v-row align="end">
<v-col cols="12" md="2" v-if="currentReport.license">
<ValidationProvider rules="required" v-slot="{ errors }">
<ValidationProvider rules="required" immediate v-slot="{ errors }">
<v-select :items="emaTypes"
:readonly="currentReport.isClosed"
v-model="currentReport.license.licenseType"
Expand All @@ -53,7 +54,7 @@
</ValidationProvider>
</v-col>
<v-col cols="12" md="3" v-if="currentReport.license">
<ValidationProvider rules="required" v-slot="{ errors }">
<ValidationProvider rules="required" immediate v-slot="{ errors }">
<v-text-field type="number"
:readonly="currentReport.isClosed"
v-model="currentReport.license.number"
Expand All @@ -62,7 +63,7 @@
</ValidationProvider>
</v-col>
<v-col cols="12" md="2">
<ValidationProvider rules="required" v-slot="{ errors }">
<ValidationProvider rules="required" immediate v-slot="{ errors }">
<DatePickerBase type="number" label="License"
:disabled="currentReport.isClosed"
v-model="currentReport.date"
Expand All @@ -73,13 +74,24 @@
<v-col cols="6" md="2">
<v-checkbox v-model="IsCompleted" label="Completed" disabled />
</v-col>
<v-col cols="6" md="2">
<v-col cols="6" md="2" class="text-right">
<v-checkbox
v-if="currentReport.isClosed"
v-model="currentReport.isClosed"
label="Close Report"
label="Closed"
:disabled="currentReport.isClosed || !CanCloseReport"
@click="dialogClose = true"
/>
<v-btn
v-else
:disabled="!valid || currentReport.isClosed || !CanCloseReport"
color="success"
class="v-btn--example2"
@click="currentReport.isClosed=true; saveReportChanges"
>
<v-icon>mdi-lock</v-icon>
Close Report
</v-btn>
</v-col>
</v-row>
<v-fab-transition>
Expand Down Expand Up @@ -144,7 +156,7 @@
<v-list-item-title>
<v-row justify="start" align="center">
<v-col cols="10" md="6" class="font-weight-black">
{{ checkListIndex + 1 }} .- {{ item.text }}
{{ checkListIndex + 1 }} .- {{ item.text }} {{ item.annotation }}
<span v-if="item.checks.filter(c => c.required && c.checked===0).length == 0">
<v-chip x-small color="success">Completed</v-chip>
</span>
Expand Down Expand Up @@ -298,7 +310,7 @@
<v-text-field v-model="signature.designation" :readonly="currentReport.isClosed" label="Designation" />
</v-col>
<v-col cols="12" md="2">
<DatePickerBase v-model="signature.date" :disabled="currentReport.isClosed" label="Date" max="" />
<DatePickerBase v-model="signature.date" :disabled="currentReport.isClosed" label="Date" max="" min="" />
</v-col>
</v-row>
<v-row>
Expand Down Expand Up @@ -447,6 +459,7 @@ export default class EditReport extends mixins(InnerPageMixin) {
obs: InstanceType<typeof ValidationObserver>
}
showCarousel: boolean = false
savingNewReport: boolean = false
currentPhoto: number = 0
showLabelEdit:number[] = []
showUpdateCheck: { parentIndex:number, currentIndex:number }[] =[]
Expand Down Expand Up @@ -582,6 +595,7 @@ export default class EditReport extends mixins(InnerPageMixin) {
}
async saveReportChanges() {
this.savingNewReport = true
const update: UpdateReportCommand = {
id:this.currentReport.id,
name:this.currentReport.name,
Expand All @@ -608,6 +622,7 @@ export default class EditReport extends mixins(InnerPageMixin) {
this.$axios.$put(`signatures/${signature.id}`, command)
})
})
this.savingNewReport=false
}
@Watch('currentReport', { deep: false })
Expand Down Expand Up @@ -684,6 +699,9 @@ export default class EditReport extends mixins(InnerPageMixin) {
return item.checks.length === item.checks.filter((c:any) => c.checked).length
}
mounted() {
return this.$refs.obs.validate()
}
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/ClientApp/pages/Reports/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
v-on="on"
:disabled="item.isClosed"
color="primary"
@click="$router.push(`/checklists?configurationid=undefined&configurationonly=false&reportid=${item.id}`)"
@click="$router.push(`/checklists?&configurationonly=false&reportid=${item.id}`)"
>
mdi-format-list-checks
</v-icon>
Expand All @@ -80,7 +80,7 @@
v-on="on"
:disabled="item.isClosed"
color="primary"
@click="$router.push(`/signatures?configurationid=undefined&configurationonly=false&reportid=${item.id}`)"
@click="$router.push(`/signatures?&configurationonly=false&reportid=${item.id}`)"
>
mdi-draw
</v-icon>
Expand Down
8 changes: 4 additions & 4 deletions src/ClientApp/pages/Signatures/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default class SignaturesPage extends mixins(InnerPageMixin) {
filter: FilterType = {
filterText: '',
inConfigurationOnly: undefined,
repotId: undefined,
reportId: undefined,
reportConfigurationId: undefined
}
Expand Down Expand Up @@ -245,9 +245,9 @@ export default class SignaturesPage extends mixins(InnerPageMixin) {
console.log(query)
let filter: FilterType = {
filterText: '',
inConfigurationOnly: query.configurationonly ?? true,
repotId: query.reportid ?? undefined,
reportConfigurationId: parseInt(query.configurationid) ?? undefined
inConfigurationOnly: query.configurationonly === 'true' ? true:false ?? true,
reportId: query.reportid ? parseInt(query.reportid) : undefined,
reportConfigurationId: query.configurationid ? parseInt(query.configurationid) : undefined
}
return {
filter
Expand Down
2 changes: 1 addition & 1 deletion src/ClientApp/types/Filter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface FilterType {
filterText: String;
inConfigurationOnly: Boolean | undefined;
repotId: number | undefined;
reportId: number | undefined;
reportConfigurationId: number | undefined;
}

0 comments on commit ea1eeef

Please sign in to comment.