-
Notifications
You must be signed in to change notification settings - Fork 2
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
Yasser branch #12
base: main
Are you sure you want to change the base?
Yasser branch #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, i just wrote some comments for you. Johan will give you more info when you two meet online.
templates/Customer/new.html.twig
Outdated
<span class="input-group-text"> | ||
<i class="bi bi-envelope"></i> | ||
</span> | ||
{{ form_widget(form.email, { attr: { class: 'form-control' } }) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors from backend are not showing, you can place form_errors here
</div> | ||
<hr class="my-4"> | ||
|
||
{#Home Address Section#} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicit code blocks. You can create new component and include it here 3 times with different parameters
templates/Customer/show.html.twig
Outdated
{% endif %} | ||
<div class="row mb-4 mt-5 justify-content-center"> | ||
<div class="col-4 text-center d-grid gap-2"> | ||
<a href="/" class="btn btn-secondary">Back</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use path function for links
@@ -0,0 +1,71 @@ | |||
<script lang="ts"> | |||
export let addressFields; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no type here
@@ -0,0 +1,66 @@ | |||
<script lang="ts"> | |||
export let basicFields; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types will help you with autocompletion and with maintaining code
|
||
let customer = undefined as undefined | CustomerType; | ||
|
||
const navTabs = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no type here
</div> | ||
</div> | ||
|
||
{#if customer.addressHome} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicit blocks of code. Use component instead
let billingCountryRequired = false; | ||
|
||
//update required status based on other fields | ||
$: homeCountryRequired = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicit functionality
}; | ||
|
||
//prefill address fields if they exist | ||
if (customer.addressHome) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicit functionality
</div> | ||
|
||
<!-- Home Address --> | ||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be loaded automaticaly based on navTabs variable
No description provided.