File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
burger-webapp/src/components Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -547,7 +547,7 @@ components:
547547 example : ' user123'
548548 nickname :
549549 type : string
550- description : Optional nickname for the order (first 8 characters will be displayed in the dashboard )
550+ description : Optional nickname for the order (only first 10 chars displayed)
551551 example : ' John'
552552 items :
553553 type : array
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export const tools = [
7979 description : 'Place a new order with burgers (requires userId)' ,
8080 schema : z . object ( {
8181 userId : z . string ( ) . describe ( 'ID of the user placing the order' ) ,
82- nickname : z . string ( ) . optional ( ) . describe ( 'Optional nickname for the order (first 8 characters will be displayed in the dashboard )' ) ,
82+ nickname : z . string ( ) . optional ( ) . describe ( 'Optional nickname for the order (only first 10 chars displayed)' ) ,
8383 items : z
8484 . array (
8585 z . object ( {
Original file line number Diff line number Diff line change @@ -112,15 +112,15 @@ export class BurgerDashboard extends LitElement {
112112
113113 protected renderOrder = ( order : BurgerOrder , isLeaving = false ) => {
114114 const animClass = isLeaving ? 'fade-out' : '' ;
115- const displayId = order . nickname ? order . nickname . slice ( 0 , 8 ) : order . id . slice ( - 8 ) ;
115+ const displayId = order . nickname ? order . nickname . slice ( 0 , 10 ) : `# ${ order . id . slice ( - 6 ) } ` ;
116116 return html `
117117 <div
118118 data- or der- id= "${ order . id } "
119119 class = "order-anim ${ animClass } "
120120 @animationend = ${ isLeaving ? ( ) => this . handleFadeOutEnd ( order . id ) : undefined }
121121 >
122122 <div class= "${ this . getOrderBoxClass ( order ) } " >
123- <div class= "order-id" > # ${ displayId } </ div>
123+ <div class= "order-id" > ${ displayId } </ div>
124124 <div class= "order-status" >
125125 <div class= "order-status-inner" > ${ this . getOrderDisplayStatus ( order ) } </ div>
126126 </ div>
You can’t perform that action at this time.
0 commit comments