Skip to content

Commit

Permalink
Fixing lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 committed Dec 19, 2023
1 parent 1a13d58 commit c314ac8
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils

# revision identifiers, used by Alembic.
revision = "99d317cbc848"
Expand Down
3 changes: 1 addition & 2 deletions src/dispatch/forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from pydantic import Field
from typing import Optional, List

from sqlalchemy import Column, Integer, ForeignKey, DateTime, String
from sqlalchemy_utils import TSVectorType
from sqlalchemy import Column, Integer, ForeignKey, String
from sqlalchemy.orm import relationship

from dispatch.database.core import Base
Expand Down
3 changes: 1 addition & 2 deletions src/dispatch/forms/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

from sqlalchemy.orm import Session

from .models import Forms, FormsCreate, FormsUpdate
from .models import Forms, FormsUpdate
from dispatch.individual import service as individual_service
from dispatch.project import service as project_service

log = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions src/dispatch/forms/type/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from pydantic import Field
from typing import List, Optional

from sqlalchemy import JSON, Boolean, Column, Integer, ForeignKey, String, DateTime
from sqlalchemy import Boolean, Column, Integer, ForeignKey, String
from sqlalchemy.sql.schema import UniqueConstraint
from sqlalchemy_utils import TSVectorType
from sqlalchemy.orm import relationship

from dispatch.database.core import Base
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/forms/type/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create_forms_type(
return create(
db_session=db_session, creator=current_user, forms_type_in=forms_type_in
)
except IntegrityError as e:
except IntegrityError:
raise ValidationError(
[
ErrorWrapper(
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/forms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from dispatch.models import PrimaryKey
from dispatch.exceptions import ExistsError

from .models import FormsRead, FormsCreate, FormsUpdate, FormsPagination
from .models import FormsRead, FormsUpdate, FormsPagination
from .service import get, create, update, delete

log = logging.getLogger(__name__)
Expand Down
3 changes: 0 additions & 3 deletions src/dispatch/static/dispatch/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions src/dispatch/static/dispatch/src/forms/EditForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
</v-list-item>
</template>
<v-card-text v-if="page_schema">
<FormKit style="margin-left: 20px; margin-right: 20px" type="form" v-model="form_data" :actions="false">
<FormKit
style="margin-left: 20px; margin-right: 20px"
type="form"
v-model="form_data"
:actions="false"
>
<FormKitSchema :schema="page_schema" :data="form_data" />
</FormKit>
</v-card-text>
<div v-if="!has_formkit_pro" class="ml-11 text-caption text-grey">For more advanced form components, upgrade to <a href="https://formkit.com/pro" target="_blank" rel="noopener noreferrer">FormKit Pro</a></div>
<div v-if="!has_formkit_pro" class="ml-11 text-caption text-grey">
For more advanced form components, upgrade to
<a href="https://formkit.com/pro" target="_blank" rel="noopener noreferrer">FormKit Pro</a>
</div>
<v-card-actions>
<v-spacer />
<div>
Expand All @@ -25,7 +33,12 @@
<v-btn v-bind="props" color="red en-1" variant="text"> Exit without saving </v-btn>
</template>
<v-list>
<v-list-item @click="showCreateEdit = false; closeCreateEdit()">
<v-list-item
@click="
showCreateEdit = false
closeCreateEdit()
"
>
<v-list-item-title> You will lose any changes. Continue? </v-list-item-title>
</v-list-item>
<v-list-item @click="showCreateEdit = true">
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/static/dispatch/src/forms/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
},

create(payload) {
return API.post(`${resource}`, payload)
return API.post(`${resource}`, payload)
},

update(formId, creator_id, payload) {
Expand Down
27 changes: 20 additions & 7 deletions src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,28 @@
</template>
<span class="text-h5 ml-10 mt-3 mb-3">Incident Information</span>
<span class="ml-10" v-for="item in incident_data.data">

Check failure on line 14 in src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue

View workflow job for this annotation

GitHub Actions / build

Elements in iteration expect to have 'v-bind:key' directives
<b>{{ item.question }}</b>: {{ item.answer }}<br />
<b>{{ item.question }}</b
>: {{ item.answer }}<br />
</span>
<span class="ml-10" v-if="incident_data.slack_channel">
<b>Slack channel</b>: <a :href="incident_data.slack_channel">#{{ incident_data.name }}</a> <br />
<b>Slack channel</b>: <a :href="incident_data.slack_channel">#{{ incident_data.name }}</a>
<br />
</span>
<span class="ml-10" v-if="incident_data.incident_doc">
<b>Incident document</b>: <a :href="incident_data.incident_doc">{{ incident_data.name }} Incident Document</a> <br />
<b>Incident document</b>:
<a :href="incident_data.incident_doc">{{ incident_data.name }} Incident Document</a> <br />
</span>
<v-divider class="mt-5" />
<span class="text-h5 ml-10 mt-3 mb-3">Form Data</span>
<span class="ml-10" v-for="item in page_data">

Check failure on line 28 in src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue

View workflow job for this annotation

GitHub Actions / build

Elements in iteration expect to have 'v-bind:key' directives
<b>{{ item.question }}</b>: {{ item.answer }}<br />
<b>{{ item.question }}</b
>: {{ item.answer }}<br />
</span>
<v-divider class="mt-5" />
<span class="text-h5 ml-10 mt-3">Attorney Section</span>
<span class="text-caption ml-10">To be completed by counsel only. This section is privileged and confidential.</span>
<span class="text-caption ml-10"
>To be completed by counsel only. This section is privileged and confidential.</span
>
<v-container class="ml-6">
<v-row>
<v-col cols="5">
Expand Down Expand Up @@ -56,7 +62,12 @@
<v-btn v-bind="props" color="red en-1" variant="text"> Exit without saving </v-btn>
</template>
<v-list>
<v-list-item @click="showAttorneyEdit = false; closeAttorneyEdit()">
<v-list-item
@click="
showAttorneyEdit = false
closeAttorneyEdit()
"
>
<v-list-item-title> You will lose any changes. Continue? </v-list-item-title>
</v-list-item>
<v-list-item @click="showAttorneyEdit = true">
Expand All @@ -65,7 +76,9 @@
</v-list>
</v-menu>
</div>
<v-btn color="blue en-1" variant="text" @click="saveAttorneyAnalysis()"> Update form </v-btn>
<v-btn color="blue en-1" variant="text" @click="saveAttorneyAnalysis()">
Update form
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@
name="Form Schema"
/>
</v-col>
<div v-if="!has_formkit_pro" class="ml-11 text-caption text-grey">For more advanced form components, upgrade to <a href="https://formkit.com/pro" target="_blank" rel="noopener noreferrer">FormKit Pro</a></div>
<div v-if="!has_formkit_pro" class="ml-11 text-caption text-grey">
For more advanced form components, upgrade to
<a href="https://formkit.com/pro" target="_blank" rel="noopener noreferrer"
>FormKit Pro</a
>
</div>
</v-row>
</v-container>
</v-card-text>
Expand Down
1 change: 0 additions & 1 deletion src/dispatch/static/dispatch/src/incident/FormsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ import NewEditDialog from "@/forms/EditForm.vue"
import DeleteDialog from "@/forms/DeleteDialog.vue"
import Participant from "@/incident/Participant.vue"
export default {
name: "IncidentFormsTab",
components: { NewEditDialog, DeleteDialog, Participant },
Expand Down
1 change: 0 additions & 1 deletion src/dispatch/static/dispatch/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ let SENTRY_ENABLED = import.meta.env.VITE_DISPATCH_SENTRY_ENABLED
let SENTRY_DSN = import.meta.env.VITE_DISPATCH_SENTRY_DSN
const FORMKIT_PRO_PROJECT_KEY = import.meta.env.VITE_FORMKIT_PRO_PROJECT_KEY


if (SENTRY_ENABLED) {
const APP_HOSTNAME = document.location.host

Expand Down

0 comments on commit c314ac8

Please sign in to comment.