<div class="row">
  <div class="col-md-12">
    <div class="bg-white">
        <div moe large>
            <a start show href="#">Add Memo</a>
            <form url="/api/memo/create">
                <input type="hidden" name="appUserUid" value="{{ $user->uid }}">
                <div class="mb-2">
                    <textarea type="text" name="content" value="" class="form-control "></textarea>
                </div>
                <div class="mt-3">
                    <button submit class="btn btn-sm btn-primary me-2">Confirm</button>
                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
                </div>
            </form>
        </div>
        <table class="table table-striped">
          @foreach($user->memos as $memo)
          <tr>
              <td>{{friendly_date_time($memo->created_at)}}</td>
              <td>
                  {{$memo->content}}
                  <div moe large>
                      <a start show href="#">edit</a>
                      <form url="/api/memo/updateContent">
                          <input type="hidden" name="uid" value="{{ $memo->uid }}">
                          <div class="mb-2">
                              <textarea type="text" name="content" value="" class="form-control form-control-sm">{{$memo->content}}</textarea>
                          </div>
                          <div class="mt-3">
                              <button submit class="btn btn-sm btn-primary me-2">Confirm</button>
                              <button cancel class="btn btn-sm btn-default border">Cancel</button>
                          </div>
                      </form>
                  </div>
              </td>
          </tr>
          @endforeach
        </table>
    </div>
  </div>

</div>
