Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <mvc:View controllerName="isasubscriptionsentitlements.isasubscriptionsentitlements_demo.controller.NewSubscription"
- xmlns:mvc="sap.ui.core.mvc" xmlns:l="sap.ui.layout" xmlns="sap.m" xmlns:ux="sap.uxap" xmlns:eff="sap.f" xmlns:core="sap.ui.core"
- xmlns:f="sap.ui.layout.form">
- <ux:ObjectPageLayout id="ObjectPageLayout" enableLazyLoading="true" useIconTabBar="true" showFooter="true">
- <ux:headerTitle>
- <ux:ObjectPageHeader objectTitle="Subscription: {SubModel>/documentNumber}">
- <ux:actions>
- <Button text="Upgrade"/>
- <Button text="Suspend"/>
- <Button text="Cancel"/>
- <Button text="Switch Snapshot"/>
- </ux:actions>
- </ux:ObjectPageHeader>
- </ux:headerTitle>
- <ux:headerContent>
- <l:VerticalLayout>
- <eff:Avatar
- src="https://ecenta-sb1.us10.revenue.cloud.sap/AS25YMW35UEWVJ7ACCOIUNQHNKEKBFWV/webapps/customers-webapp/images/customer_placeholder.svg"
- displaySize="XL" displayShape="Circle" showBorder="true"/>
- </l:VerticalLayout>
- <l:VerticalLayout>
- <ObjectStatus title="{i18n>cust}" text="{CustomerModel>/corporateInfo/company}"/>
- <ObjectStatus title="{i18n>contact}" text=""/>
- <ObjectStatus title="{i18n>customerEmail}" text="{CustomerModel>/defaultAddress/email}"/>
- <ObjectStatus title="{i18n>customerPhone}" text="{CustomerModel>/defaultAddress/phone}"/>
- </l:VerticalLayout>
- <l:VerticalLayout>
- <ObjectStatus title="{i18n>validFrom}"
- text="{path: 'SubModel>/validFrom', type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' } }"/>
- <ObjectStatus title="{i18n>ExpiresOn}"
- text="{path: 'SubModel>/expiresOn', type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' } }"/>
- </l:VerticalLayout>
- <l:VerticalLayout>
- <ObjectStatus title="Snapshot On"
- text="{path: 'SubModel>/snapshots/0/effectiveDate', type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' }}"/>
- <ObjectStatus title="{i18n>subMarket}" text="{SubModel>/market/id}"/>
- <ObjectStatus title="{i18n>timeZone}" text="{SubModel>/market/timeZone}"/>
- </l:VerticalLayout>
- </ux:headerContent>
- <ux:sections>
- <ux:ObjectPageSection title="General Info">
- <ux:subSections>
- <ux:ObjectPageSubSection>
- <VBox>
- <f:Form id="customerForm" editable="false">
- <f:title>
- <core:Title text="Customer Information"/>
- </f:title>
- <f:layout>
- <f:ColumnLayout columnsM="2" columnsL="3" columnsXL="4"/>
- </f:layout>
- <f:formContainers>
- <f:FormContainer>
- <f:formElements>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Customer ID" required="true" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Input value="{SubModel>/customer/id}" width="40%" change="onCustomerSelected"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Company" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{CustomerModel>/corporateInfo/company}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Contact Name" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Email" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{CustomerModel>/defaultAddress/email}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Address" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{CustomerModel>/defaultAddress/houseNumber} {CustomerModel>/defaultAddress/street} {CustomerModel>/defaultAddress/Leipzig} {CustomerModel>/defaultAddress/country}"/>
- </f:fields>
- </f:FormElement>
- </f:formElements>
- </f:FormContainer>
- </f:formContainers>
- </f:Form>
- <f:Form editable="false">
- <f:title>
- <core:Title text="Market"/>
- </f:title>
- <f:layout>
- <f:ColumnLayout columnsM="2" columnsL="2" columnsXL="3"/>
- </f:layout>
- <f:formContainers>
- <f:FormContainer title="Market">
- <f:formElements>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Market" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="Europe" width="40%"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Time Zone" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:formElements>
- </f:FormContainer>
- </f:formContainers>
- </f:Form>
- <f:Form editable="false">
- <f:title>
- <core:Title text="Billing"/>
- </f:title>
- <f:layout>
- <f:ColumnLayout columnsM="2" columnsL="2" columnsXL="3"/>
- </f:layout>
- <f:formContainers>
- <f:FormContainer title="Market">
- <f:formElements>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Bill Split Element" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- <Input width="40%" change="onBillSplitSelected" value="{SubModel>/billSplitElement}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Billing Cycle" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/billingCycle}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Next Scheduled Billing Date" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{ path: 'SubModel>/nextScheduledBillingDate' , type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' } }"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Billing Cycle Reference Date" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{path: 'SubModel>/billingCycleReferenceDate' , type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' } }"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Bill Recurring Charges Together" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text text="{SubModel>/billingCycle}"/>-->
- </f:fields>
- </f:FormElement>
- </f:formElements>
- </f:FormContainer>
- </f:formContainers>
- </f:Form>
- <f:Form editable="false">
- <f:title>
- <core:Title text="Subscription Terms"/>
- </f:title>
- <f:layout>
- <f:ColumnLayout columnsM="2" columnsL="3" columnsXL="4"/>
- </f:layout>
- <f:formContainers>
- <f:FormContainer title="Cancellation Policy">
- <f:FormElement visible="true">
- <f:label>
- <Label text="Withdrawal Period" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/cancellationPolicy/withdrawalPeriod} "/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Withdrawal Period Start" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- <!--add formater to check if the withdrawl start date exists/ if not change it to createdAt?-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Withdrawal Period End" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{path: 'SubModel>/cancellationPolicy/withdrawalPeriodEndDate' , type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' } }"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Term of Notice" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Allow Mid-Bill Cycle Expiration" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/cancellationPolicy/allowMidBillCycleExpiration}"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:FormContainer>
- <f:FormContainer title="Duration">
- <f:FormElement visible="true">
- <f:label>
- <Label text="Minimum Term" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Minimum Term Start" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Minimum Term End" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:FormContainer>
- <f:FormContainer title="Renewal">
- <f:FormElement visible="true">
- <f:label>
- <Label text="Renewal Term" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Renewal Term End" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:FormContainer>
- </f:formContainers>
- </f:Form>
- <f:Form editable="false">
- <f:title>
- <core:Title text="Processing Data"/>
- </f:title>
- <f:layout>
- <f:ColumnLayout columnsM="2" columnsL="3" columnsXL="4"/>
- </f:layout>
- <f:formContainers>
- <f:FormContainer title="Subscription Dates">
- <f:FormElement visible="true">
- <f:label>
- <Label text="Valid From" required="true" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <DatePicker value="{SubModel>/validFrom}" valueFormat="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" width="40%" change="onValidFChange"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Expires On" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Created" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{path: 'SubModel>/createdAt' , type: 'sap.ui.model.type.DateTime', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, style: 'long' }}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Created By" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/createdBy}"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Changed" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{path: 'SubModel>/changedAt' , type: 'sap.ui.model.type.DateTime', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, style: 'long' }}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Changed By" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/changedBy}"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:FormContainer>
- <f:FormContainer title="Snapshot Data">
- <f:FormElement visible="true">
- <f:label>
- <Label text="Preceding Document ID" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/snapshots/0/precedingDocument/documentNumber}"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Created" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{path: 'SubModel>/snapshots/0/createdAt' , type: 'sap.ui.model.type.DateTime', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, style: 'long' }}"/>
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Created By" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text text="{SubModel>/snapshots/0/createdBy}"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Effective Date" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <Text
- text="{path: 'SubModel>/snapshots/0/effectiveDate' , type: 'sap.ui.model.type.Date', formatOptions: { source: { pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ' }, pattern: 'MMM dd, yyyy' } }"/>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:FormContainer>
- <f:FormContainer title="Related Documents">
- <f:FormElement visible="true">
- <f:label>
- <Label text="Quote" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- <f:FormElement visible="true">
- <f:label>
- <Label text="Order" design="Standard" width="100%" textAlign="Begin" textDirection="Inherit"/>
- </f:label>
- <f:fields>
- <!--<Text id="custID" text="{CustomerModel>/customerNumber}"/>-->
- </f:fields>
- </f:FormElement>
- </f:FormContainer>
- </f:formContainers>
- </f:Form>
- </VBox>
- </ux:ObjectPageSubSection>
- </ux:subSections>
- </ux:ObjectPageSection>
- <ux:ObjectPageSection title="{i18n>itemlist}">
- <ux:subSections>
- <ux:ObjectPageSubSection>
- <Table updateFinished="onUpdateFinished" items="{SubModel>/snapshots/0/items/}" id="subTable" inset="true" class="sapUiNoContentPadding"
- popinLayout="GridSmall" growing="true" growingThreshold="10" growingScrollToLoad="false">
- <headerToolbar>
- <Toolbar>
- <Title level="H2" id="subTableTitle"/>
- <ToolbarSpacer/>
- <Button class="sortBorder sapUiSizeCompact" icon="sap-icon://add" tooltip="Add Item" press="onAddProduct"/>
- </Toolbar>
- </headerToolbar>
- <columns>
- <Column minScreenWidth="Desktop" demandPopin="true">
- <Label text="{i18n>item}" design="Bold" wrapping="true"/>
- </Column>
- <Column minScreenWidth="Desktop" demandPopin="true">
- <Label text="{i18n>prdName}" design="Bold" wrapping="true"/>
- </Column>
- <Column minScreenWidth="Desktop" demandPopin="true">
- <Label text="{i18n>prdId}" design="Bold" wrapping="true"/>
- </Column>
- <Column minScreenWidth="Desktop" demandPopin="true">
- <Label text="{i18n>sbscrTyp}" design="Bold" wrapping="true"/>
- </Column>
- <Column minScreenWidth="Desktop" demandPopin="true">
- <Label text="{i18n>RNA}" design="Bold" wrapping="true"/>
- </Column>
- </columns>
- <items>
- <ColumnListItem type="Navigation" press="onDetailsView">
- <cells>
- <Text text="{SubModel>lineNumber}" class="SmallDeviceText"/>
- <Text text="{SubModel>product/name}"/>
- <Text text="{SubModel>product/code}"/>
- <Text text="{SubModel>subscriptionType}"/>
- <Text text=""/>
- </cells>
- </ColumnListItem>
- </items>
- </Table>
- </ux:ObjectPageSubSection>
- </ux:subSections>
- </ux:ObjectPageSection>
- </ux:sections>
- <ux:footer>
- <Bar design="Auto">
- <contentRight>
- <Button id="cancel-button" press="onCancel" text="Cancel" iconFirst="true" width="auto" iconDensityAware="false"/>
- <Button id="save-button" press="onSubscriptionSave" text="Save" type="Emphasized" iconFirst="true" width="auto" iconDensityAware="false"/>
- </contentRight>
- </Bar>
- </ux:footer>
- </ux:ObjectPageLayout>
- </mvc:View>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement