success page

This commit is contained in:
Ruidy 2024-03-15 10:47:09 +01:00
parent bc2c7a7583
commit faf5432b99
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
5 changed files with 43 additions and 3 deletions

View file

@ -56,6 +56,6 @@ func handleRequestBooking(bs *booking.Service) echo.HandlerFunc {
bs.CreateRequest(from, to, name, phoneNumber, email, itemStr, 1)
return renderTempl(c, http.StatusSeeOther, view.BaseLayout())
return renderTempl(c, http.StatusSeeOther, view.Success())
}
}

View file

@ -97,6 +97,6 @@ templ RequestBookingForm(rbvm *RequestBookingViewModel) {
Message
<textarea name="message" id="message"></textarea>
</label>
<button type="submit">Book</button>
<button type="submit">Reservez</button>
</form>
}

View file

@ -172,7 +172,7 @@ func RequestBookingForm(rbvm *RequestBookingViewModel) templ.Component {
return templ_7745c5c3_Err
}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("></label></fieldset><label for=\"message\">Message <textarea name=\"message\" id=\"message\"></textarea></label> <button type=\"submit\">Book</button></form>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("></label></fieldset><label for=\"message\">Message <textarea name=\"message\" id=\"message\"></textarea></label> <button type=\"submit\">Reservez</button></form>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View file

@ -0,0 +1,5 @@
package view
templ Success() {
<strong>Done</strong>
}

View file

@ -0,0 +1,35 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.543
package view
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import "context"
import "io"
import "bytes"
func Success() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<strong>Done</strong>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}