123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
{
  "surface_id": "photo-input-submit",
  "surface_version": 1,
  "payload": {
    "objects": [
      {
        "beginRendering": {
          "surfaceId": "photo-input-submit",
          "root": "root-card"
        }
      },
      {
        "surfaceUpdate": {
          "surfaceId": "photo-input-submit",
          "components": [
            {
              "id": "root-card",
              "component": {
                "Card": {
                  "child": "main-column"
                }
              }
            },
            {
              "id": "main-column",
              "component": {
                "Column": {
                  "children": {
                    "explicitList": [
                      "title",
                      "subtitle",
                      "photo-input",
                      "submit-button"
                    ]
                  },
                  "alignment": "stretch"
                }
              }
            },
            {
              "id": "title",
              "component": {
                "Label": {
                  "text": {
                    "literalString": "Upload Receipt"
                  },
                  "variant": "title"
                }
              }
            },
            {
              "id": "subtitle",
              "component": {
                "Label": {
                  "text": {
                    "literalString": "Take a photo or choose one from your gallery."
                  },
                  "variant": "caption"
                }
              }
            },
            {
              "id": "photo-input",
              "component": {
                "PhotoInput": {
                  "value": {
                    "path": "/photoUrl"
                  },
                  "hasValue": {
                    "path": "/hasPhoto"
                  },
                  "isUploading": {
                    "path": "/isUploading"
                  },
                  "placeholder": {
                    "literalString": "Snap a pic"
                  }
                }
              }
            },
            {
              "id": "submit-button",
              "component": {
                "Button": {
                  "child": "submit-label",
                  "style": "primary",
                  "enabled": {
                    "path": "/hasPhoto"
                  },
                  "action": {
                    "name": "submit_photo",
                    "context": [
                      {
                        "key": "photoUrl",
                        "value": {
                          "path": "/photoUrl"
                        }
                      }
                    ]
                  }
                }
              }
            },
            {
              "id": "submit-label",
              "component": {
                "Label": {
                  "text": {
                    "literalString": "Continue"
                  },
                  "variant": "bodySansSemibold"
                }
              }
            }
          ]
        }
      },
      {
        "dataModelUpdate": {
          "surfaceId": "photo-input-submit",
          "path": "/",
          "contents": []
        }
      }
    ]
  }
}
0 tokens
Upload Receipt
Take a photo or choose one from your gallery.