Skip to content

Conversation

usseif97
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Sep 23, 2025

This PR targets the un-managed branch odoo/tutorials:18.0-oBoarding-yoahm, it needs to be retargeted before it can be merged.

@cgun-odoo cgun-odoo self-requested a review September 25, 2025 15:17
@cgun-odoo
Copy link

Hey @usseif97 you're targeting your own branch here. Edit the PR to target 18.0

Copy link

@cgun-odoo cgun-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job overall 🙂 but don't use AI 💢 if you have any questions just come to me and we can solve it better



setup() {
this.checkBoxItems = useState(this.props.items.map((item) => { // Add 'enabled' field to Item -> return Array of Objects

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.checkBoxItems = useState(this.props.items.map((item) => { // Add 'enabled' field to Item -> return Array of Objects
this.checkBoxItems = useState(this.props.items.map((item) => {

what's that comment for 😆

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just a note for me, that item object have a new field now


addTodo(event) {
if(event.key === "Enter" && event.target.value.trim() !== ""){
const newId = this.todos.length ? Math.max(...this.todos.map(t => t.id)) +1 : 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep a state variable called nextId or currentId which keeps track of this value I think it would look better

Comment on lines +1 to +21
/**
* useAutofocus - helper to focus an input element
* @param {Component} component - the component instance
* @param {string} refName - the t-ref name of the input element
*/
export function useAutofocus(component, refName) {
// Store original mounted method
const originalMounted = component.mounted;

component.mounted = function () {
// Call original mounted() if it exists
if (originalMounted) {
originalMounted.call(this);
}

// Focus the element
if (this.refs && this.refs[refName]) {
this.refs[refName].focus();
}
};
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit ai generated to me huh 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it didn’t work, so I moved on and continued with the next step

@usseif97 usseif97 requested a review from cgun-odoo September 29, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants